[cmake-developers] generator expressions with variable

Tim Blechmann tim at klingt.org
Sat Apr 19 10:55:17 EDT 2014


>> $<$<BOOL:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>>:-I$<JOIN:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>, -I>>
> 
> Does it work without the variable in there. (By the time the generator
> expression evaluator gets the string, it should be expanded.)
> 
>> however evaluating the expression results in this command string:
>> $<1:-I$<JOIN:$ -I>>
> 
> Should that '$' be ','? Where did your literal ',' go from the above
> genex?


hmm, i've updated cmake to the current master branch (the other one was
a few days old). now the expression evaluates to (if the properties are
"a;b;c"):

$<1:-I $<JOIN:a;b;c , -I>>

though it does not matter, if the target is passed via variable or directly.

any idea?

thnx,
tim




More information about the cmake-developers mailing list