header image
[ # ] Enable Warnings, Debugging and Profiling with CMake
March 15th, 2010 under Programming

To tell the compiler to print warnings, add debugging symbols and profiling code add the following line to your

1
CMakeLists.txt
CMakeLists.txt

1
set(CMAKE_CXX_FLAGS "-Wall -g -pg")
set(CMAKE_CXX_FLAGS "-Wall -g -pg")

as usual

specifies the warning level enables debugging and profiling.