How to specify the flags for debug vs C / C ++ release.
How to specify the flags for debug vs C / C ++ release.
CMAKE_BUILD_TYPE is the CMake variable you are looking for. You can generate the build files by passing the definition of this variable to the command line:
cmake -DCMAKE_BUILD_TYPE=Debug ..
You can also change the value of CMAKE_BUILD_TYPE
by running ccmake ..
, by enabling advanced mode (by pressing t ). When finished, press c to configure and g to generate the new files.