View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001587CMakepublic2005-02-09 10:172006-10-04 20:21
ReporterKris Dekeyser 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001587: EnableLanguage bug
DescriptionDekeyser, 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.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
There are no notes attached to this issue.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team