MantisBT - CMake
View Issue Details
0015585CMakeCMakepublic2015-05-26 10:492016-06-10 14:31
Ilya 
Kitware Robot 
normalfeatureN/A
closedmoved 
CMake 3.2.2 
 
0015585: Add support for the if / else construct to generator expressions
It's often desirable to provide content for both branches, e.g.:

    $<CONFIG:Debug:-O0?-O2>

Right now code should like this:

        $<CONFIG:Debug:-O0>$<$<NOT:$<CONFIG:Debug>>:-O2>

Which is beyond being readable.
No tags attached.
Issue History
2015-05-26 10:49IlyaNew Issue
2015-12-21 06:13Daniel WolfNote Added: 0040005
2016-06-10 14:29Kitware RobotNote Added: 0042782
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0040005)
Daniel Wolf   
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: http://stackoverflow.com/q/34393562/52041 [^] . Interestingly, I used almost the identical example there.
(0042782)
Kitware Robot   
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.