[CMake] Don't use comma as an alternate separator

Using comma can break in cases when we're passing flags that already
use comma as a separator.

Fixes PR35504.

Differential Revision: https://reviews.llvm.org/D40761

llvm-svn: 319719
This commit is contained in:
Petr Hosek 2017-12-05 00:15:18 +00:00
parent c0f5f4deae
commit 6851c0c38e

View File

@ -95,7 +95,7 @@ function(llvm_ExternalProject_Add name source_dir)
foreach(prefix ${ARG_PASSTHROUGH_PREFIXES})
foreach(variableName ${variableNames})
if(variableName MATCHES "^${prefix}")
string(REPLACE ";" "," value "${${variableName}}")
string(REPLACE ";" "|" value "${${variableName}}")
list(APPEND PASSTHROUGH_VARIABLES
-D${variableName}=${value})
endif()
@ -160,7 +160,7 @@ function(llvm_ExternalProject_Add name source_dir)
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
LIST_SEPARATOR ,
LIST_SEPARATOR |
)
if(ARG_USE_TOOLCHAIN)