<div dir="ltr">Sorry, I meant to keep this on the mailing list.  Hit reply without checking.<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 1:33 PM, Andrew Fuller <span dir="ltr"><<a href="mailto:mactalla.obair@gmail.com" target="_blank">mactalla.obair@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

A non-trivial overhaul of the graphviz option implementation will<br>
be needed to make it useful on projects using modern features.<br></blockquote><div><br></div></div><div>Okay, I understand.</div><div><br></div><div>As I've continued to investigate this I think my issue is actually deeper.</div>

<div><br></div><div>When setting compiler definitions I can set a list within a generator expression and the entire set is handled correctly.</div><div><br></div><div>eg:</div><div>target_compile_definitions( my_target PRIVATE</div>

<div> $<$<PLATFORM_ID:Windows>:winone;wintwo></div><div> $<$<PLATFORM_ID:Linux>:linuxone;linuxtwo> )</div><div>gives -Dlinuxone -Dlinuxtwo on the command line under Linux.</div><div><br></div><div>

However, trying to do the same with target_link_libraries yields different results:</div><div>target_link_libraries( my_target PRIVATE</div><div> $<$<PLATFORM_ID:Windows>:win.1;win.2></div><div> $<$<PLATFORM_ID:Linux>:lin.1;lin.2> )</div>

<div>gives a link line of -lwin.2 -llin.1 -llin.2 </div><div><br></div><div>As I was experimenting I discovered that $<JOIN:...> provides an interesting perspective into the issue:</div><div>target_link_libraries( my_target PRIVATE</div>

<div> $<$<PLATFORM_ID:Windows>:$<JOIN:win.1;win.2, -I>></div><div> $<$<PLATFORM_ID:Linux>:lin.1;lin.2> )</div><div>gives a link line of -llin.1 -llin.2</div><div>$<JOIN...> seems to correctly group the list so the elements don't leak out of the generator expression.  At least when the condition evaluates to 0.</div>

<div><br></div><div>However,</div><div>target_link_libraries( my_target PRIVATE</div><div> $<$<PLATFORM_ID:Windows>:$<JOIN:win.1;win.2, -I>></div><div> $<$<PLATFORM_ID:Linux>:$<JOIN:lin.1;lin.2, -l>> )</div>

<div>Gives</div><div>CMake Error:</div><div><br></div><div>  Error evaluating generator expression:</div><div><br></div><div>    $<JOIN:lin.1></div><div><br></div><div>  $<JOIN> expression requires 2 comma separated parameters, but got 1</div>

<div>  instead.</div><div><br></div><div>It appears in this instance as though the list is being split before the generator expression is being evaluated.  $<JOIN...> seems to function as expected when used in target_compile_definitions.</div>

<div><br></div><div>Is there a limitation in target_link_libraries I should be aware of?  I didn't find anything obvious in the documentation.</div><div>I should mention I'm running 3.0.0-rc3 and set cmake_policy( VERSION 3.0 ).</div>

<div><br></div><div>Thanks,</div><div>-Andrew</div><div><br></div><div><br></div></div></div></div>
</blockquote></div><br></div></div>