[CMake] CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE_INIT ...
Eric BOIX
eboix at ens-lyon.fr
Mon Apr 3 10:23:56 EDT 2006
Dear cmake users,
I'm trying to do the following things:
1/ set up a default CMAKE_BUILD_TYPE for my project (say RelWithDebInfo)
that of course shows up in the GUIs,
2/ adding a new custom BUILD_TYPE (let's call it Maintainer).
After googling around quite a while I started to believe that some
possible answers to 1/ were:
* SET(CMAKE_BUILD_TYPE RelWithDebInfo)
as stated by the "Compilers and Tools" section of
http://www.cmake.org/Wiki/CMake_Useful_Variables
* SET(CMAKE_BUILD_TYPE_INIT RelWithDebInfo)
according to
http://public.kitware.com/pipermail/cmake/2003-November/004482.html
Alas they both fail to show up in the GUI... Do I really need to use
the trick given two years ago by
http://public.kitware.com/pipermail/cmake/2004-April/005064.html
or is there a "cleaner" way of doing this (that would not confuse users
with a dummy MY_BUILD_TYPE which is an indirection for CMAKE_BUILD_TYPE) ?
After some more googling I started to believe that some possible
answers to 2/ were:
* SET( CMAKE_BUILD_TYPE Maintainer )
SET( CMAKE_CXX_FLAGS_MAINTAINER "-Wall")
SET( CMAKE_C_FLAGS_MAINTAINER "-Wall")
SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER "--no-allow-shlib-undefined")
as stated by the "Compilers and Tools" section of
http://www.cmake.org/Wiki/CMake_Useful_Variables
but this doesn't show up in the GUI. Maybe it is sufficient to
CACHE those variables, but then the Wiki page needs to be completed...
* Based on the usage of CMAKE_CONFIGURATION_TYPES
as stated by
http://public.kitware.com/pipermail/cmake/2003-November/004482.html
allthough the comment of the code provided by
http://www.itk.org/pipermail/insight-users/2003-May/003580.html
makes me feel that this is a way for restricting the default configuration
types and not to extend them...
Eventually, since I ran up into the *_INIT cmake variables (e.g.
CMAKE_CXX_FLAGS_DEBUG_INIT ), could anyone point to some hints
on their usage ? [there is a single answer pointed by
http://www.google.com/search?hl=en&lr=&q=CMAKE_CXX_FLAGS_DEBUG_INIT+site%3Awww.cmake.org&btnG=Search
and it is useless in this context...]
I promiss to feed the Wiki with any effective answers.
Oh, well, maybe I should order the latest version of "Mastering CMake" ? :-)
Thanks,
Respectfuly yours,
Eric Boix.
More information about the CMake
mailing list