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

Mehdi Rabah mehdi.rabah at gmail.com
Tue Feb 13 05:23:35 EST 2007


Thanks, and sorry to have called compiler optimization "tweaks", my english
is not so good... but I see that you understood it.

Still,  when I type "ccmake ." and I toggle to advanced mode, I only get
CMAKE_BACKWARDS_COMPATIBILITY variable.

Here is what my CMakeLists.txt look like:
------------------
project ( Test )
cmake_minimum_required ( VERSION 2.4.4 )

set ( CMAKE_VERBOSE_MAKEFILE OFF )
set ( CMAKE_BUILD_TYPE Debug )

set ( EXECUTABLE_OUTPUT_PATH
${PROJECT_BINARY_DIR}/../Build/${CMAKE_BUILD_TYPE}/bin )
set ( LIBRARY_OUTPUT_PATH
${PROJECT_BINARY_DIR}/../Build/${CMAKE_BUILD_TYPE}/lib )

include_directories ( Structs )

add_subdirectory ( Applications )
add_subdirectory ( Drivers )
----------------

Do I made something wrong ?

Regards,



On 2/12/07, Eric Noulard <eric.noulard at gmail.com> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070213/19c227b0/attachment.htm


More information about the CMake mailing list