Brad King wrote:

> On 04/23/2013 03:26 PM, Stephen Kelly wrote:
>> The $<JOIN> branch is almost ready, but I thought something worth
>> bringing up is the use of a comma as a separator.
> [snip]
>>  $<JOIN:one;two;three,,> # results in one,two,three
>> 
>> Do you think that's more or less confusing? Should I implement it?
> 
> I think the literal "," is fine.  Authors that think it is confusing
> can choose to use $<COMMA> if they wish.

Ok. I implemented it in join-genex in my clone. While implementing it, I 
discovered a bug in the handling of commas in arbitrary content which has 
existed since they were introduced, which is also fixed in that branch.

> 
> However, won't
> 
>  -I$<JOIN:$<TARGET_PROP:${target},INCLUDE_DIRECTORIES>,-I>
> 
> result in
> 
>  -Ia-Ib-Ic
> 
> ?

Yes.

> What decides if the output of a JOIN is a list or string?

It's always a string. Adding a semicolon to your separator generates a 
cmake-list:

 -I$<JOIN:$<TARGET_PROP:${target},INCLUDE_DIRECTORIES>,;-I>

or use \n to generate a file with one include per line, as I did in the qt4 
moc macros patch.

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to