From d9f3ae98202c803e9b84d70e8ad580d270410bf3 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 20 Nov 2015 22:08:49 +0000 Subject: [PATCH] [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. llvm-svn: 253719 --- cmake/modules/LLVMExternalProjectUtils.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/LLVMExternalProjectUtils.cmake b/cmake/modules/LLVMExternalProjectUtils.cmake index 63178ce6906..01d5e337b8d 100644 --- a/cmake/modules/LLVMExternalProjectUtils.cmake +++ b/cmake/modules/LLVMExternalProjectUtils.cmake @@ -93,8 +93,9 @@ function(llvm_ExternalProject_Add name source_dir) 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()