set(update_src_props ON)
endif()
+ list(APPEND LLVM_COMPILE_CFLAGS " ${LLVM_COMPILE_FLAGS}")
+
# LLVM_REQUIRES_EH is an internal flag that individual targets can use to
# force EH
if(LLVM_REQUIRES_EH OR LLVM_ENABLE_EH)
# - LLVM_COMPILE_FLAGS is list.
# - PROPERTY COMPILE_FLAGS is string.
string(REPLACE ";" " " target_compile_flags " ${LLVM_COMPILE_FLAGS}")
+ string(REPLACE ";" " " target_compile_cflags " ${LLVM_COMPILE_CFLAGS}")
if(update_src_props)
foreach(fn ${sources})
get_filename_component(suf ${fn} EXT)
- if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c")
+ if("${suf}" STREQUAL ".cpp")
set_property(SOURCE ${fn} APPEND_STRING PROPERTY
COMPILE_FLAGS "${target_compile_flags}")
endif()
+ if("${suf}" STREQUAL ".c")
+ set_property(SOURCE ${fn} APPEND_STRING PROPERTY
+ COMPILE_FLAGS "${target_compile_cflags}")
+ endif()
endforeach()
else()
# Update target props, since all sources are C++.