mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 11:23:52 +00:00
[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS
This avoids the need for string-ification and lets CMake deduplicate potentially duplicate flags. Differential Revision: https://reviews.llvm.org/D122750
This commit is contained in:
parent
e1567e771b
commit
d47565ed62
@ -5,19 +5,11 @@ 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(argstring "")
|
||||
foreach(arg ${ARGN})
|
||||
set(argstring "${argstring} ${arg}")
|
||||
endforeach()
|
||||
set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}")
|
||||
set_property(TARGET ${target} PROPERTY COMPILE_OPTIONS ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(set_target_link_flags target)
|
||||
set(argstring "")
|
||||
foreach(arg ${ARGN})
|
||||
set(argstring "${argstring} ${arg}")
|
||||
endforeach()
|
||||
set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}")
|
||||
set_property(TARGET ${target} PROPERTY LINK_OPTIONS ${ARGN})
|
||||
endfunction()
|
||||
|
||||
# Set the variable var_PYBOOL to True if var holds a true-ish string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user