[cmake-developers] [CMake 0015577]: The 'project' command overwrites CMAKE_CONFIGURATION_TYPES.
Mantis Bug Tracker
mantis at public.kitware.com
Wed May 20 11:38:34 EDT 2015
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=15577
======================================================================
Reported By: Cedric Guerin
Assigned To:
======================================================================
Project: CMake
Issue ID: 15577
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-05-20 11:38 EDT
Last Modified: 2015-05-20 11:38 EDT
======================================================================
Summary: The 'project' command overwrites
CMAKE_CONFIGURATION_TYPES.
Description:
If you have cmake files in a hierarchy of directories like in the sample
provided, and use additional project commands in subdirectories (in my case in
order to generate additional Visual Studio Solutions with only a subset of all
the libraries generated), the project command will change the value of
CMAKE_CONFIGURATION_TYPES to what appears to be a merge of the initial value
outside any project declaration and it's current value, and this value will even
be stored in the cache, affecting completely unrelated directory subhierarchies.
Steps to Reproduce:
Simply run cmake on the provided sample.
Additional Information:
The output of the provided sample in a fresh build directory is:
CMAKE_CONFIGURATION_TYPES at start is :
CMAKE_CONFIGURATION_TYPES before global project is : Debug;Release;Default
CMAKE_CONFIGURATION_TYPES after global project is : Debug;Release;Extra
CMAKE_CONFIGURATION_TYPES before libraries project is : Debug;Release;Extra
CMAKE_CONFIGURATION_TYPES after libraries project is :
Debug;Release;Default;Extra
CMAKE_CONFIGURATION_TYPES for runtimes is : Debug;Release;Default;Extra
While the expected output whould be for CMAKE_CONFIGURATION_TYPES to remain at
Debug;Release;Extra once set.
Note that you can remove the assigment to CMAKE_CONFIGURATION_TYPES outside any
project, it's only there to help identify what occurs. Without it, cmake
considers that the value outside of any project is the one stored in
CMakeCache.txt (or the 4 default configurations if there is no CMakeCache.txt),
but the overall behavior is the same.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-05-20 11:38 Cedric Guerin New Issue
2015-05-20 11:38 Cedric Guerin File Added: Project.zip
======================================================================
More information about the cmake-developers
mailing list