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"><<a href="mailto:phb@spotify.com">phb@spotify.com</a>></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 <<a href="mailto:glenn.coombs@gmail.com">glenn.coombs@gmail.com</a>> wrote:<br>
> For variables like CMAKE_C_FLAGS one can append to them like this:<br>
><br>
> set(CMAKE_C_FLAGS "${CMAKE_CFLAGS} -some_option")<br>
><br>
> For target properties like LINK_FLAGS I was using this command:<br>
><br>
> set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS<br>
> /NODEFAULTLIB:"LIBCMT")<br>
><br>
> to do the append. However, when I append a second time:<br>
><br>
> set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS<br>
> /INCLUDE:_InitLibrary)<br>
><br>
> then it breaks because the string that Visual Studio sees contains a<br>
> semicolon in between the 2 options. I can work round this by writing my<br>
> append like this:<br>
><br>
> get_property(link_flags TARGET myDLL PROPERTY LINK_FLAGS)<br>
> set(link_flags "${link_flags} /INCLUDE:_InitLibrary")<br>
> set_target_properties(myDLL PROPERTIES LINK_FLAGS ${link_flags})<br>
><br>
> but that is a bit verbose for my liking. I understand that the semicolons<br>
> are how cmake separates list items from one another but shouldn't cmake<br>
> automatically stringify the list (by replacing semicolons with spaces)<br>
> before passing it through to the generator code ? The same problem will<br>
> occur for any of the XXX_FLAGS properties like COMPILE_FLAGS that are passed<br>
> through unchanged to the makefile or Visual Studio project file.<br>
><br>
> Is it worth filing a feature request to ask for cmake to stringify lists for<br>
> the appropriate variables ? Or is there a good reason why cmake can't or<br>
> shouldn't implement this behaviour ?<br>
><br>
> --<br>
> Glenn<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
</blockquote></div><br>