How do I enable all compiler warnings in CLion?

I want to see all the compiler warnings in CLion. I don't want to be treated like errors, but I want to test them.

How can i do this?

+3


source to share


3 answers


Try setting the compiler flag to CMakeLists.txt

:

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")

      



Related questions: How to enable C ++ 11 in CLion?

+5


source


Rebuild the entire project. Most compilers don't rebuild every file when you just hit build, so you will only see warnings from files that have changed.



+1


source


For C:

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")

      

0


source







All Articles