Cmake variables are global, which is why we would get crud like /machine:X86 in the...
authorAaron Ballman <aaron@aaronballman.com>
Thu, 23 Oct 2014 22:13:52 +0000 (22:13 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 23 Oct 2014 22:13:52 +0000 (22:13 +0000)
llvm-svn: 220522

compiler-rt/cmake/Modules/CompilerRTUtils.cmake

index 1eb8f2e..ae59732 100644 (file)
@@ -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()