[CMake] generator expressions

Brad King brad.king at kitware.com
Fri Jun 6 09:08:17 EDT 2014


On 06/05/2014 04:44 PM, Andrew Fuller wrote:
>     target_link_libraries( my_target PRIVATE
>      $<$<PLATFORM_ID:Windows>:win.1;win.2>
>      $<$<PLATFORM_ID:Linux>:lin.1;lin.2> )
>     gives a link line of -lwin.2 -llin.1 -llin.2 
[snip]
>      $<$<PLATFORM_ID:Windows>:$<JOIN:win.1;win.2, -l>>
[snip]
> It appears in this instance as though the list is being split before
> the generator expression is being evaluated.

I cannot reproduce these.  Can you provide a complete CMakeLists.txt
example please?

For the JOIN expression with a space, you could quote the whole
thing to make sure the space is recognized as part of the argument.

-Brad



More information about the CMake mailing list