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