[CMake] CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE_INIT ...
Axel Roebel
Axel.Roebel at ircam.fr
Wed Apr 5 11:25:20 EDT 2006
On Wednesday 05 April 2006 14:19, Eric BOIX wrote:
> Dear Brad King,
>
> Quoting Brad King <brad.king at kitware.com>:
> > To get options in the GUI they need to be cache settings. Use the CACHE
> > form of the SET command.
> >
> > IF(NOT CMAKE_BUILD_TYPE)
> > SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
> > "Build Configuration")
> > ENDIF(NOT CMAKE_BUILD_TYPE)
>
> I had to add the FORCE flag in order to see the result appear in the GUIs.
> I hope this is ok ?
I had in fact the same problem as you. I would like to have a default
CMAKE_INSTALL_PREFIX
different of /usr/local.
so the NOT test above will not work because CMAKE_INSTALL_PREFIX is never
empty. Therefore, I test for the existance of CMakeCache.txt and FORCE the
new default value if this file does not exist.
The unfortunate side effect is that I cannot override the default value by
means of command line arguments.
Would there be a better way to change default values?
Note, that I don't want -C to be used because I want the proper default values
to be used in the make rebuild_cache target!
I wonder whether it would not be much easier of cmake would take into account
a default values file like ${CMAKE_SOURCE_DIR}/CMakeDefaults.cmake
which would be used (if it exists) to set default values much like the -C
command line option.
Kind regards,
> May I abuse and ask again about some hints on the *_INIT cmake variables
> (e.g. CMAKE_CXX_FLAGS_DEBUG_INIT ) and their proper usage ?
>
> Respectfuly yours,
> Eric Boix.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
--
Axel Roebel
IRCAM Analysis/Synthesis Team
Email: Axel.Roebel at ircam.fr | Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540
More information about the CMake
mailing list