From 5b15f1fbce98929eef9ad6996274f36044af5496 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 23 Oct 2014 22:13:52 +0000 Subject: 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 --- cmake/Modules/CompilerRTUtils.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake') 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() -- cgit v1.2.3