diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-10-23 22:13:52 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-10-23 22:13:52 +0000 |
commit | 5b15f1fbce98929eef9ad6996274f36044af5496 (patch) | |
tree | bf326c78f2fc2ceedc19585c4c2ee9feebf8c70b /cmake/Modules/CompilerRTUtils.cmake | |
parent | 889a0b067eca53033b4a45ecca13313f71b66e3f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTUtils.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index 1eb8f2e3a..ae5973292 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -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() |