[cmake-developers] output expressions fails with either a build.ninja error or wrong escaped space

jerry.c.t at web.de jerry.c.t at web.de
Tue May 31 14:28:44 EDT 2016


Hi,
 
thanks for the response. I was eager to solve this. I came up 
with this solution:
 
-I$<JOIN:$<TARGET_PROPERTY:dummy,INCLUDE_DIRECTORIES>,\t-I>
 
I searched for a solution where i can use it without the quotes
while the tab (\t) takes care that it is recognized as a generator
expression. Now my command line looks a little bit odd with all these
tabs but it works.
 
I choosed the \t because i need spaces between the arguments and 
there is no escape sequence for spaces.
 
So i simply wonder whether it is possible to add to cmake 
something like \s for a space.
 
Jerry
 
On 31.05.2016 16:22, Brad King wrote:
> On 05/28/2016 01:15 PM, jerry.c.t at web.de wrote:
>> "-I$<JOIN:$<TARGET_PROPERTY:dummy,INCLUDE_DIRECTORIES>, -I>"
>
> This tells CMake to generate a single argument consisting of the
> entire expanded value. We have no syntax to expand lists into
> multiple command line arguments after evaluation of generator
> expressions. Without the quotes the "$<" and ">" parts appear
> in different arguments to add_custom_command and so it is not
> recognized as a generator expression.
>
> It is not currently possible to do what you are trying to do.
> You'll need to use file(GENERATE) to produce a script holding
> the desired command instead. Then launch the script as the
> custom target's command.
>
> -Brad
> 


More information about the cmake-developers mailing list