blt
blt copied to clipboard
New utility macro for conditionally setting a variable?
It might be useful to add a new utility macro to set a variable using a ternary operator
blt_set(TO <var>
IF <cnd>
THEN <true_val>
ELSE <false_val>
[CACHE TRUE|FALSE]
)
This would replace the following
if( <cnd> )
set(<var> <true_val>)
else()
set(<var> <false_val>)
endif()
Other possible names:
- blt_conditional_set
- blt_ternary_set
- blt_set_if
- blt_ternary