Reputation: 9129
I use Clion 2016.1 Clion creates project with CMakeLists.txt and main.c:
The content of CMakeLists.txt is:
cmake_minimum_required(VERSION 3.4)
project(Fir)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
set(SOURCE_FILES main.c)
add_executable(Fir ${SOURCE_FILES})
The content of main.c is:
#include <stdio.h>
int main(void) {
printf("Hello, world");
getchar();
return 0;
}
But it gives:
Configuration is still incorrect. Do you want to edit it again?
How to properly declare configuration to run the project
Upvotes: 0
Views: 1690
Reputation: 26637
It works for me, I make a new project, build it and choose the project name as executable with this cmake contents:
cmake_minimum_required(VERSION 3.5)
project(new)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.c)
add_executable(new ${SOURCE_FILES})
Upvotes: 1