Skip to content

Add a generator expression for immediate-if

vector-of-bool requested to merge vector-of-bool/cmake:iif-genex into master

I've wanted to get my feet wet with CMake development for a while, so when I spotted this feature request tagged as "easy", and corresponding to a feature I've wanted for a while, I decided to give it a try. Here's the result of that.

This merge defines a new generator expression $<IIF> (named after the immediate-if function). It takes three parameters: a conditional, a truth-value, and a false-value. If the conditional is 1, the expression evaluates to the truth-value. If the conditional is 0, the expression evaluates to the false-value.

Merge request reports