[CMake] cmake 2.4.2 CMAKE_CXX_FLAGS_DEBUG

Brad King brad.king at kitware.com
Wed Jun 7 16:59:57 EDT 2006


frederic heem wrote:
> It has been suggested to use the following command to set different debug 
> compiler flags:
> SET(CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb -O0" CACHE STRING "Debug options.")
> Unfortunately, it no longer works with cmake 2.4.2. It is ignored, only -g is 
> present.

Did this work in any version of CMake?

Try this:

SET(CMAKE_CXX_FLAGS_DEBUG
   "-g3 -ggdb -O0" CACHE STRING "Debug options." FORCE
   )

Read the documentation of the SET command for details.

-Brad


More information about the CMake mailing list