diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -58,7 +58,7 @@ if(update_src_props) foreach(fn ${sources}) get_filename_component(suf ${fn} EXT) - if("${suf}" STREQUAL ".cpp") + if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c") set_property(SOURCE ${fn} APPEND_STRING PROPERTY COMPILE_FLAGS "${target_compile_flags}") endif()