]> granicus.if.org Git - clang/commitdiff
[CMake] Fix handling of passing through semi-colon separated lists.
authorChris Bieneman <beanz@apple.com>
Fri, 20 Nov 2015 22:09:03 +0000 (22:09 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 20 Nov 2015 22:09:03 +0000 (22:09 +0000)
When passing around CMake arguments as lists of arguments any arguments containing lists need to have their semi-colons escaped otherwise CMake will split the arguments in the middle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253720 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/CMakeLists.txt

index ebbe152be1d9949f4b88dbc0759d69d8cd6f9280..5ca20c92077e93dbff8eca59cbb69cbaacbe5f3c 100644 (file)
@@ -49,8 +49,9 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
   get_cmake_property(variableNames VARIABLES)
   foreach(varaibleName ${variableNames})
     if(varaibleName MATCHES "^COMPILER_RT")
+      string(REPLACE ";" "\;" value "${${varaibleName}}")
       list(APPEND COMPILER_RT_PASSTHROUGH_VARIABLES
-        -D${varaibleName}=${${varaibleName}})
+        -D${varaibleName}=${${value}})
     endif()
   endforeach()