[CMake] cmake-2.8.12: generator expression error when linker flags have comma

Jed Brown jed at 59A2.org
Sun Oct 20 09:48:36 EDT 2013


Nick Hutchinson <nshutchinson at gmail.com> writes:

> target_link_libraries() is supposed to work for linker flags as well:
>
> cmake version 2.8.12
>   target_link_libraries
>        Link a target to given libraries.
>
>          target_link_libraries(<target> [item1 [item2 [...]]]
>                                [[debug|optimized|general] <item>] ...)
>
>        Specify libraries or flags to use when linking a given target.  The
>        named <target> must have been created in the current directory by a
>        command such as add_executable or add_library.  The remaining
>        arguments specify library names or flags.

Exactly, and the next paragraph is:

       If a library name matches that of another target in the project a
       dependency will automatically be added in the build system to make
       sure the library being linked is up-to-date before the target links.
       Item names starting with '-', but not '-l' or '-framework', are
       treated as linker flags.
 

This all works with earlier versions of CMake.  Did 2.8.12 intentionally
break compatibility and forget to document it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131020/7d3fb7bc/attachment.pgp>


More information about the CMake mailing list