ADD FLAGS TO CLION C PROJECT
已回答
hey i have added these lines to the cmakelists file and it does not work, can you tell me what is wrong ?
set(GCC_COVERAGE_COMPILE_FLAGS "gcc−g−Wall−ansi−Wpedantic−Wextra convert . c−o convert")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
请先登录再写评论。
Hello!
You should specify compiler flags in the first line, not the entire gcc command for compiling. So it should be:
Here is our quick CMake tutorial, it might be useful to you: https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html.