MantisBT - CMake
View Issue Details
0012342CMakeCMakepublic2011-07-15 04:182012-02-06 06:07
Johan Björk 
Alex Neundorf 
normalminoralways
closedfixed 
CMake 2.8.5 
CMake 2.8.6CMake 2.8.6 
0012342: Using set_property(...APPEND) for COMPILE_FLAGS result in semicolons in the build command line
ADD_EXECUTABLE(foo foo.c)
SET_PROPERTY(TARGET foo APPEND PROPERTY COMPILE_FLAGS "-x c++")
SET_PROPERTY(TARGET foo APPEND PROPERTY COMPILE_FLAGS "-fPIC")
demonstrates the problem. Tested with the makefile generator.
No tags attached.
related to 0012327closed Kitware Robot Appending Multiple COMPILE_FLAGS Produces Unexpected Results 
Issue History
2011-07-15 04:18Johan BjörkNew Issue
2011-07-15 14:59Alex NeundorfAssigned To => Alex Neundorf
2011-07-15 14:59Alex NeundorfStatusnew => assigned
2011-07-15 15:00Alex NeundorfNote Added: 0027041
2011-07-15 15:01Alex NeundorfSeveritymajor => minor
2011-07-15 15:01Alex NeundorfStatusassigned => resolved
2011-07-15 15:01Alex NeundorfResolutionopen => fixed
2011-07-15 15:01Alex NeundorfRelationship addedrelated to 0012327
2011-07-15 15:16Bill HoffmanNote Added: 0027042
2011-09-12 17:14David ColeFixed in Version => CMake 2.8.6
2011-09-12 17:14David ColeTarget Version => CMake 2.8.6
2012-02-06 06:07David ColeNote Added: 0028504
2012-02-06 06:07David ColeStatusresolved => closed

Notes
(0027041)
Alex Neundorf   
2011-07-15 15:00   
I just pushed a branch SetPropertyAppendString to the next branch.
There set_property() has the new option APPEND_STRING, which can be used instead of APPEND, then the new value is simply appended to the existing string, instead of being appended as a new element to a list.
(0027042)
Bill Hoffman   
2011-07-15 15:16   
Not directly related to this, but you can set the language on a source file in a cross platform/compiler way:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:LANGUAGE [^]

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set_source_files_properties [^]

Set the language to CXX.
(0028504)
David Cole   
2012-02-06 06:07   
Closing resolved issues that have not been updated in more than 4 months.