[LLVMdev] cmake/ninja build failing
Brad King
brad.king at kitware.com
Thu Feb 13 06:08:39 PST 2014
On 2/12/2014 11:15 PM, Seth Cantrell wrote:
> Well, I updated to cmake 2.8.12.2 but the result of changing that
> COMPILE_FLAGS to COMPILE_OPTIONS is that quotes are applied incorrectly
That's because the set_target_compile_flags function in LLVM is
creating the space-separated command-line string that the old
COMPILE_FLAGS option wants:
>> function(set_target_compile_flags target)
>> foreach(arg ${ARGN})
>> set(argstring "${argstring} ${arg}")
>> endforeach()
>> set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}")
>> endfunction()
Try changing the function to just:
function(set_target_compile_flags target)
set_property(TARGET ${target} PROPERTY COMPILE_OPTIONS "${ARGN}")
endfunction()
Of course an upstream version of this change would be simpler
if it just dropped set_target_compile_flags and set the property
directly at the call sites. One could even use the APPEND option
of set_property to add options incrementally.
-Brad
More information about the llvm-dev
mailing list