[llvm] r253719 - [CMake] Fix handling of passing through semi-colon separated lists.

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 14:08:49 PST 2015


Author: cbieneman
Date: Fri Nov 20 16:08:49 2015
New Revision: 253719

URL: http://llvm.org/viewvc/llvm-project?rev=253719&view=rev
Log:
[CMake] Fix handling of passing through semi-colon separated lists.

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.

Modified:
    llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake

Modified: llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake?rev=253719&r1=253718&r2=253719&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake (original)
+++ llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake Fri Nov 20 16:08:49 2015
@@ -93,8 +93,9 @@ function(llvm_ExternalProject_Add name s
   get_cmake_property(variableNames VARIABLES)
   foreach(varaibleName ${variableNames})
     if(varaibleName MATCHES "^${nameCanon}")
+      string(REPLACE ";" "\;" value "${${varaibleName}}")
       list(APPEND PASSTHROUGH_VARIABLES
-        -D${varaibleName}=${${varaibleName}})
+        -D${varaibleName}=${${value}})
     endif()
   endforeach()
 




More information about the llvm-commits mailing list