<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le jeu. 4 oct. 2018 à 18:59, Marc CHEVRIER <<a href="mailto:marc.chevrier@gmail.com">marc.chevrier@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am afraid that you cannot mix "optimized" or "debug" keywords with "generator expressions" because keywords handling is done during evaluation of command "target_link_libraries" and "generator expressions" are evaluated during generation.<div><br></div><div>And target_link_libraries expect following pattern: [<keyword>] <library> [<library> ...], so specifying a generator expression wrapping this breaks the parsing of the arguments: keyword is no longer at the beginning of the sequence so it is no longer  recognized as is...</div><div><br></div><div>So, The most efficient way to work-around this problem is to transform your list of libraries in valid generator expressions:</div><div><ul><li><font size="2">INITIAL: optimized foo debug food_d</font></li><li><font size="2">RESULT: $<$<CONFIG:RELEASE>:foo> $<$<CONFIG:DEBUG>:foo_d></font></li></ul><div><font size="2">For that purpose, an helper function can do the trick...</font></div></div></div></blockquote><div><br></div><div>I agree with you Marc but I nevertheless think the handling of list in genex has something unexpected.</div><div><br></div><div>See my previous example with custom target.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>