cmGeneratorExpressionEvaluator: Short-circuit boolean operators
Short-circuit evaluation of IF, AND and OR generator expressions.
This reduces confusion and verbosity of some generator expression logic.
# Before
$<IF:$<IS_TARGET:${x}>,$<$<IS_TARGET:${x}>:$<TARGET_FILE:${x}>>,NO-TARGET>
# After
$<IF:$<IS_TARGET:${x}>,$<TARGET_FILE:${x}>,NO-TARGET>
The old behavior with the After example gives the following error when set(x test)
:
Error evaluating generator expression:
$<TARGET_FILE:test>
No target "test"