[Cmake] Some problems

Bill Hoffman bill . hoffman at kitware . com
Wed, 18 Jun 2003 12:16:36 -0400


At 10:57 AM 6/18/2003, David Svoboda wrote:


>PROJECT(foo) 
>SET(MY_BUILD_TYPE RELEASE CACHE STRING "Debug/Release")
>SET(CMAKE_BUILD_TYPE ${MY_BUILD_TYPE} CACHE STATIC "see MY_BUILD_TYPE")
>
>$ grep BUILD_TYPE CMakeCache.txt
>CMAKE_BUILD_TYPE:STRING=
>MY_BUILD_TYPE:STRING=RELEASE

OK, this time I actually tested it with a generator that uses BUILD_TYPE...

This should work:

PROJECT(foo)

SET(MY_BUILD_TYPE RELEASE CACHE STRING "Debug/Release")
SET(CMAKE_BUILD_TYPE ${MY_BUILD_TYPE} CACHE STATIC "see MY_BUILD_TYPE" FORCE)