View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006788CMakeCMakepublic2008-04-10 05:422008-08-19 14:43
Reporterjesperes 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0006788: CMAKE_CONFIGURATION_TYPES cannot be set in CMakeLists.txt without rerunning cmake.
DescriptionVisual Studio generator requires the value of CMAKE_CONFIGURATION_TYPES to be present in cache when CMake runs; it is not possible to set CMAKE_CONFIGURATION_TYPES in CMakeLists.txt (without rerunning CMake). Example:

project(foo)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;FooBar" CACHE STRING "" FORCE)
add_executable(foo foo.c)

Running "cmake" once to generate project files will not cause the "FooBar" configuration to be included.

Running "cmake" again, or specifying the value on the command line, works.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0013072)
Bill Hoffman (manager)
2008-08-19 14:43

You just need to move the set before the project command:

set(CMAKE_CONFIGURATION_TYPES "Debug;Release;FooBar" CACHE STRING "" FORCE)
project(foo)

 Issue History
Date Modified Username Field Change
2008-04-10 05:42 jesperes New Issue
2008-08-19 14:43 Bill Hoffman Status new => closed
2008-08-19 14:43 Bill Hoffman Note Added: 0013072
2008-08-19 14:43 Bill Hoffman Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team