forked from OSchip/llvm-project
[CMake] More robust handling for bootstrap variables
Checking defined isn't good enough we also need to handle defined to empty string. llvm-svn: 282125
This commit is contained in:
parent
d273aab55b
commit
725acc4d85
|
@ -611,7 +611,11 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
||||||
# Populate the passthrough variables
|
# Populate the passthrough variables
|
||||||
foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH})
|
foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH})
|
||||||
if(DEFINED ${variableName})
|
if(DEFINED ${variableName})
|
||||||
string(REPLACE ";" "\;" value ${${variableName}})
|
if("${${variableName}}" STREQUAL "")
|
||||||
|
set(value "")
|
||||||
|
else()
|
||||||
|
string(REPLACE ";" "\;" value ${${variableName}})
|
||||||
|
endif()
|
||||||
list(APPEND PASSTHROUGH_VARIABLES
|
list(APPEND PASSTHROUGH_VARIABLES
|
||||||
-D${variableName}=${value})
|
-D${variableName}=${value})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue