forked from OSchip/llvm-project
Cmake variables are global, which is why we would get crud like /machine:X86 in the list of compiler options for MSVC. Clear out the variable before attempting to enumerate arguments and set them.
llvm-svn: 220522
This commit is contained in:
parent
03478d952d
commit
e927a17022
|
@ -2,6 +2,7 @@
|
|||
# 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()
|
||||
|
@ -9,6 +10,7 @@ function(set_target_compile_flags target)
|
|||
endfunction()
|
||||
|
||||
function(set_target_link_flags target)
|
||||
set(argstring "")
|
||||
foreach(arg ${ARGN})
|
||||
set(argstring "${argstring} ${arg}")
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in New Issue