[CMake] Cache variables

Vitor Vasconcelos Araujo Silva vasconcv at loria.fr
Tue Jun 12 13:07:10 EDT 2007


	Hi all,

	I'm having a strange problem with my variables. In the root of my 
project (that builds two libs and few executables), I have those 
definitions:

SET (CMAKE_BUILD_TYPE "Release" CACHE TYPE STRING)

IF (WIN32)
   # WARNING: The configuration type only works for make based generators.
   SET(CMAKE_CONFIGURATION_TYPES "Release" CACHE STRING
       "The Windows version is built only in RELEASE version" FORCE)
   SET(CMAKE_CXX_WARNING_LEVEL "0" CACHE STRING "No WARNINGS on 
Windows" 	FORCE)
ENDIF(WIN32)

	When I execute it on Linux, everything goes fine, except the 
CMAKE_BUILD_TYPE variable remains untouched.

	On Windows, this variable is set! (and I don't need it). But the 
stranger is: the CMAKE_CONFIGURATION_TYPES is kept with all possible 
configurations (the default, I suppose), even with the FORCE parameter.
	However, the CMAKE_CXX_WARNING_LEVEL is set to zero correctly.

	Anybody has a clue about this? I always bet I can be doing something 
wrong. But, what?
	Thanks a lot,

	Vitor

p.s.: I'm using Cmake 2.4 patch 3



More information about the CMake mailing list