[CMake] set_property(SOURCE APPEND PROPERTY COMPILE_FLAGS) generates list output
James Bigler
jamesbigler at gmail.com
Mon Nov 15 15:17:44 EST 2010
I'm trying to append a bunch of extra compile flags to a list of source
files:
set_property(SOURCE foo.cpp main.cpp APPEND PROPERTY COMPILE_FLAGS -Wall)
set( ignore_warning_flags
"-Wno-unused -Wno-switch -Wno-write-strings -Wno-strict-aliasing
-Wno-strict-prototypes -Wno-sign-compare" )
set_property( SOURCE ${sources}
APPEND
PROPERTY COMPILE_FLAGS "${ignore_warning_flags}"
)
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:
-include cmdoptMessageDefs.h;-Wno-unused -Wno
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.
Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101115/31fbad2c/attachment.htm>
More information about the CMake
mailing list