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

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 17:32:53 PST 2017


phosek created this revision.
Herald added a subscriber: mgorny.

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

Fixes PR35504.


Repository:
  rC Clang

https://reviews.llvm.org/D40762

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -655,7 +655,7 @@
   foreach(variableName ${variableNames})
     if(variableName MATCHES "^BOOTSTRAP_")
       string(SUBSTRING ${variableName} 10 -1 varName)
-      string(REPLACE ";" "," value "${${variableName}}")
+      string(REPLACE ";" "|" value "${${variableName}}")
       list(APPEND PASSTHROUGH_VARIABLES
         -D${varName}=${value})
     endif()
@@ -671,7 +671,7 @@
       if("${${variableName}}" STREQUAL "")
         set(value "")
       else()
-        string(REPLACE ";" "," value "${${variableName}}")
+        string(REPLACE ";" "|" value "${${variableName}}")
       endif()
       list(APPEND PASSTHROUGH_VARIABLES
         -D${variableName}=${value})
@@ -699,7 +699,7 @@
     USES_TERMINAL_CONFIGURE 1
     USES_TERMINAL_BUILD 1
     USES_TERMINAL_INSTALL 1
-    LIST_SEPARATOR ,
+    LIST_SEPARATOR |
     )
 
   # exclude really-install from main target


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40762.125250.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171202/04c582f6/attachment.bin>


More information about the cfe-commits mailing list