[CMake] configurations and (debug, release and others)

Eric Noulard eric.noulard at gmail.com
Mon Feb 12 15:03:02 EST 2007


2007/2/12, Mehdi Rabah <mehdi.rabah at gmail.com>:
> Hello,
>
> I'm still new to cmake and I was wondering if cmake tweaks the compiler
> optimization when switching from Debug to Release configurations ?
> If it's true, what is the behaviour when I set the variable into a custom
> configuration (other than Debug and Release).

There is no tweaks, depending on BUILD TYPE CMake use different
compilation FLAGS, launch "ccmake" on your project then
toggle to "advanced mode" (t) you'll something like:

CMAKE_C_FLAGS_DEBUG              -g
CMAKE_C_FLAGS_MINSIZEREL         -Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE            -O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO     -O2 -g

and other

CMAKE_xxx_DEBUG/MINSIZEREL etc...

>
> In general my question could be : what is the use off the configurations
> (CMAKE_BUILD_TYPE) other than in INSTALL command ?
> Sorry if that was already asked I didn't found.

Have a look at:
http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools


-- 
Erk


More information about the CMake mailing list