[CMake] Cache variables

David Cole david.cole at kitware.com
Tue Jun 12 13:11:22 EDT 2007


This line:
SET (CMAKE_BUILD_TYPE "Release" CACHE TYPE STRING)

should be:
SET (CMAKE_BUILD_TYPE "Release" CACHE STRING "documentation string here")

You are trying to specify "TYPE" as the type of the varibale....


HTH,
David



On 6/12/07, Vitor Vasconcelos Araujo Silva <vasconcv at loria.fr> wrote:
>
>         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
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070612/7b3869da/attachment-0001.htm


More information about the CMake mailing list