View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015585CMakeCMakepublic2015-05-26 10:492016-06-10 14:31
Assigned ToKitware Robot 
PlatformOSOS Version
Product VersionCMake 3.2.2 
Target VersionFixed in Version 
Summary0015585: Add support for the if / else construct to generator expressions
DescriptionIt's often desirable to provide content for both branches, e.g.:


Right now code should like this:


Which is beyond being readable.
TagsNo tags attached.
Attached Files


Daniel Wolf (reporter)
2015-12-21 06:13

+1. It is my experience that if the test expression is false, I rarely want the result to be an empty string; usually, I have a second value I want to use in this case.

Before this ticket was pointed out to me, I had already created a question on Stack Overflow: [^] . Interestingly, I used almost the identical example there.
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-05-26 10:49 Ilya New Issue
2015-12-21 06:13 Daniel Wolf Note Added: 0040005
2016-06-10 14:29 Kitware Robot Note Added: 0042782
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team