From 412a8d7a831005ae26680670c584fd9e5e6ad10e Mon Sep 17 00:00:00 2001 From: David Zarzycki Date: Fri, 6 Sep 2019 07:12:36 +0000 Subject: [PATCH] [CMake] LLVM_COMPILE_FLAGS also applies to C files LLVM_COMPILE_FLAGS also applies to C files, otherwise tuning flags, etc. won't be picked up. https://reviews.llvm.org/D67171 llvm-svn: 371173 --- llvm/cmake/modules/AddLLVM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 717ce8ff1684..832f261bbea8 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -58,7 +58,7 @@ function(llvm_update_compile_flags name) 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()