[CMake] generator expressions

Andrew Fuller mactalla.obair at gmail.com
Fri Jun 6 11:37:08 EDT 2014


On Fri, Jun 6, 2014 at 8:28 AM, Brad King <brad.king at kitware.com> wrote:

> On 06/06/2014 11:07 AM, Andrew Fuller wrote:
> > On Fri, Jun 6, 2014 at 6:08 AM, Brad King <brad.king at kitware.com
> <mailto:brad.king at kitware.com>> wrote:
> >
> >     I cannot reproduce these.  Can you provide a complete CMakeLists.txt
> >     example please?
> >
> > Attached
>
> Thanks.  I meant to quote the whole outermost $<> expression as one
> argument.  Also you are missing some closing '>' in the last block.
> For example:
>
> -        $<$<PLATFORM_ID:Windows>:${_windowsLibListL}>
> -        $<$<PLATFORM_ID:Linux>:$<JOIN:${_linuxLibListL}," -l">
> +        "$<$<PLATFORM_ID:Windows>:${_windowsLibListL}>"
> +        "$<$<PLATFORM_ID:Linux>:$<JOIN:${_linuxLibListL}, -l>>"
>
> -Brad
>
>
Oh my!  I wouldn't have thought of doing that.  Oops about the missed
closing '>'; with the closing > but not adjusting the quotes still gives
the syntax error.

But adding quotes around the entire thing ...  now that works!  (even for
test #2 where I'm not using $<JOIN...>.  That's an easy fix for my project.

Should I be quoting all my generator expressions?  Is that the proper
syntax?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140606/1d3fdcd1/attachment.html>


More information about the CMake mailing list