[Cmake] Some problems

David Svoboda xsvobod2 at informatics . muni . cz
Wed, 18 Jun 2003 16:26:34 +0200


On Wed, 18 Jun 2003, Bill Hoffman wrote:

> OK, I see.   
> 
> The PROJECT command enables the language and sets many of the
> built-in variables.   So, CMAKE_BUILD_TYPE is set by cmake, and
> the default value can not be overridden.   So, after the PROJECT
> command the variable has already been initialized and can not be
> re-initialized.
> 
> The way around this is to create a project specific variable. 
> 
> SET(MY_BUILD_TYPE RELEASE CACHE STRING "Debug/Release")
> SET(CMAKE_BUILD_TYPE ${MY_BUILD_TYPE} CACHE STATIC "see MY_BUILD_TYPE")
> 
> 
> Then CMAKE_BUILD_TYPE would always be set to MY_BUILD_TYPE.
> 
> 
> 
> -Bill

Yes, I think I understand, what you mean. Unfortunately your code is
incorrect - cmake cannot resolve it.


-David