View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001587 | CMake | public | 2005-02-09 10:17 | 2006-10-04 20:21 | |||||
Reporter | Kris Dekeyser | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001587: EnableLanguage bug | ||||||||
Description | Dekeyser, Kris wrote: > However, if we change the BUILD_TYPE in the GUI and reconfigure, the > CMAKE_CONFIGURATION_TYPES is not overwritten, but appended to. After a > couple of changes from and to debug and release we end up with > CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo;MinSizeRel". [snip] > I traced this down to the fact that the PROJECT setting is only done in > the macro, but why is not clear to me. If I include a PROJECT setting > directly in the CMakeLists.txt everything workes as expected. > > WHY ???? The PROJECT command is special in that it internally calls an "EnableLanguage" method on the generator. This call must be done before anything can be generated, so there is a check when the top-level listfile is parsed to make sure it has a PROJECT command. If it does not, an IMPLICIT project command is automatically added at the top. Since in your case the project command is hidden inside the macro it is not found and the implicit project command is invoked first. When it runs it sees that CMAKE_CONFIGURATION_TYPES is empty so it adds the default configurations "Debug;Release". Then your project command comes along and calls the EnableLanguage code again. This code has a bug that is only exposed in this situation and causes the append behavior. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
There are no notes attached to this issue. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |