<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">target_link_libraries() is supposed to work for linker flags as well:<div><br></div><div><div><font face="Courier New">cmake version 2.8.12</font></div><div><font face="Courier New"> target_link_libraries</font></div><div><font face="Courier New"> Link a target to given libraries.</font></div><div><font face="Courier New"><br></font></div><div><font face="Courier New"> target_link_libraries(<target> [item1 [item2 [...]]]</font></div><div><font face="Courier New"> [[debug|optimized|general] <item>] ...)</font></div><div><font face="Courier New"><br></font></div><div><font face="Courier New"> Specify libraries or flags to use when linking a given target. The</font></div><div><font face="Courier New"> named <target> must have been created in the current directory by a</font></div><div><font face="Courier New"> command such as add_executable or add_library. The remaining</font></div><div><font face="Courier New"> arguments specify library names or flags.</font></div><div><br></div><div><br></div><div><div>On 20 Oct 2013, at 09:13, Rolf Eike Beer <<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Am Samstag, 19. Oktober 2013, 18:01:55 schrieb Jed Brown:<br><blockquote type="cite">I just upgraded from cmake-2.8.11.2 to 2.8.12 and now get errors when a<br>comma ',' appears in a linker flag. Test case below. Note that this is<br>but one of many reasons for a comma to appear in linker flags.<br><br><a href="https://gist.github.com/jedbrown/7062540">https://gist.github.com/jedbrown/7062540</a><br><br> $ mkdir build && cd build<br> $ cmake -DDEP_LIBS:STRING='-Wl,--start-group -llapack -lblas<br>-Wl,--end-group' ..<br></blockquote><br><blockquote type="cite">target_link_libraries(foo ${DEP_LIBS})<br></blockquote><br>target_link_libraries is about libraries. No wonder it breaks if you pass <br>other stuff in there. I wonder if using FindBLAS and FindLAPACK would help you <br>out of that.<br><br>Eike--<br><br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br><br>CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div></body></html>