I'm trying to append a bunch of extra compile flags to a list of source files:<br><br>set_property(SOURCE foo.cpp main.cpp APPEND PROPERTY COMPILE_FLAGS -Wall)<br><br>set( ignore_warning_flags<br> "-Wno-unused -Wno-switch -Wno-write-strings -Wno-strict-aliasing -Wno-strict-prototypes -Wno-sign-compare" )<br>
<br>set_property( SOURCE ${sources}<br> APPEND<br> PROPERTY COMPILE_FLAGS "${ignore_warning_flags}"<br> )<br><br>I tried that and making ignore_warning_flags a list and not quoting it in set_property, but the compile line ends up having a semi-colon before my new set of arguments:<br>
<br><span style="font-size: 10.5pt; font-family: Consolas;">-include
cmdoptMessageDefs.h;-Wno-unused -Wno</span><br><br>I know there are issues with CMake treating some properties as strings and others as lists, but it's rather unfortunate that I can't use APPEND.<br><br>Thanks,<br>
James<br>