From 0571af01df2044b976cbd0b0c72163f6090940e6 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 26 Apr 2022 23:25:38 -0700 Subject: [PATCH] Revert "[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS" This reverts commit d47565ed62a383175ebb5cb5733f169d72715253. --- compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake index fcad227..b7bf2ba 100644 --- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -5,11 +5,19 @@ include(CheckSymbolExists) # define a handy helper function for it. The compile flags setting in CMake # has serious issues that make its syntax challenging at best. function(set_target_compile_flags target) - set_property(TARGET ${target} PROPERTY COMPILE_OPTIONS ${ARGN}) + set(argstring "") + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") endfunction() function(set_target_link_flags target) - set_property(TARGET ${target} PROPERTY LINK_OPTIONS ${ARGN}) + set(argstring "") + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") endfunction() # Set the variable var_PYBOOL to True if var holds a true-ish string, -- 2.7.4