Excellent.  Do you know if this option was included in the recent cmake 2.8.5 release, or will it not appear officially until 2.8.6 ?<br><br><div class="gmail_quote">On 22 July 2011 18:39, Johan Björk <span dir="ltr">&lt;<a href="mailto:phb@spotify.com">phb@spotify.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Glenn,<br>
<br>
An option APPEND_STRING was added, see<br>
<a href="http://public.kitware.com/Bug/view.php?id=12342" target="_blank">http://public.kitware.com/Bug/view.php?id=12342</a><br>
<br>
/Johan<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Jun 27, 2011 at 4:47 PM, Glenn Coombs &lt;<a href="mailto:glenn.coombs@gmail.com">glenn.coombs@gmail.com</a>&gt; wrote:<br>
&gt; For variables like CMAKE_C_FLAGS one can append to them like this:<br>
&gt;<br>
&gt;     set(CMAKE_C_FLAGS &quot;${CMAKE_CFLAGS} -some_option&quot;)<br>
&gt;<br>
&gt; For target properties like LINK_FLAGS I was using this command:<br>
&gt;<br>
&gt;     set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS<br>
&gt; /NODEFAULTLIB:&quot;LIBCMT&quot;)<br>
&gt;<br>
&gt; to do the append.  However, when I append a second time:<br>
&gt;<br>
&gt;     set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS<br>
&gt; /INCLUDE:_InitLibrary)<br>
&gt;<br>
&gt; then it breaks because the string that Visual Studio sees contains a<br>
&gt; semicolon in between the 2 options.  I can work round this by writing my<br>
&gt; append like this:<br>
&gt;<br>
&gt;     get_property(link_flags TARGET myDLL PROPERTY LINK_FLAGS)<br>
&gt;     set(link_flags &quot;${link_flags} /INCLUDE:_InitLibrary&quot;)<br>
&gt;     set_target_properties(myDLL PROPERTIES LINK_FLAGS ${link_flags})<br>
&gt;<br>
&gt; but that is a bit verbose for my liking.  I understand that the semicolons<br>
&gt; are how cmake separates list items from one another but shouldn&#39;t cmake<br>
&gt; automatically stringify the list (by replacing semicolons with spaces)<br>
&gt; before passing it through to the generator code ?  The same problem will<br>
&gt; occur for any of the XXX_FLAGS properties like COMPILE_FLAGS that are passed<br>
&gt; through unchanged to the makefile or Visual Studio project file.<br>
&gt;<br>
&gt; Is it worth filing a feature request to ask for cmake to stringify lists for<br>
&gt; the appropriate variables ?  Or is there a good reason why cmake can&#39;t or<br>
&gt; shouldn&#39;t implement this behaviour ?<br>
&gt;<br>
&gt; --<br>
&gt; Glenn<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
</blockquote></div><br>