I just wrote my own macro append_property(type name value) for this.<div>example:</div><div>append_property(SOURCE COMPILE_FLAGS "-x objective-c++" translate.cpp stuff.cpp)</div><div>or </div><div>append_property(TARGET COMPILE_FLAGS "foo" mytarget)<br>
etc</div><div><br></div><div>Would be nice to have that as an included macro, or at least a comment in the documentation about what happens when you pass in a list.</div><div><br></div><div>/Johan</div><div><br><div class="gmail_quote">
On Sat, Aug 13, 2011 at 8:57 PM, Clifford Yapp <span dir="ltr"><<a href="mailto:cliffyapp@gmail.com">cliffyapp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat, Aug 13, 2011 at 5:14 AM, Glenn Coombs <<a href="mailto:glenn.coombs@gmail.com">glenn.coombs@gmail.com</a>> wrote:<br>
<br>
> I haven't seen any discussion yet of my 2nd alternative of getting cmake to<br>
> automatically convert lists to space separated strings for certain variables<br>
> like CMAKE_EXE_LINKER_FLAGS_RELEASE. If cmake did this then there would be<br>
> less need for the concat version of set() as one could just use the existing<br>
> list(APPEND) functionality. Is this a realistic possibility, or are there<br>
> implementation issues with this suggestion ?<br>
<br>
</div>This surprised me as well - if you want to assemble a list of flags<br>
"on the fly" (I needed to assemble lists of lists of flags - we pass a<br>
lot of them) you have to take some care to either do the set trick<br>
correctly or convert the list to a string at the "end" (if you can be<br>
sure of where that is).<br>
<br>
Do I understand correctly that the main concern is the ability to pass<br>
args with ";' characters in these cases? Then the question becomes<br>
whether quoting ";" characters as needed in user-specified options is<br>
tricker than navigating the current behavior. To be honest, I can see<br>
where trying to specify an argument with a quoted ";" character from<br>
the command line would get a bit messy (in a "ok, how do I quote this<br>
from this enviornment" sort of way) - how common are ";" characters as<br>
components of variable values?<br>
<br>
Cheers,<br>
<font color="#888888">CY<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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: <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>
</div></div></blockquote></div><br></div>