diff options
author | Chris Bieneman <beanz@apple.com> | 2016-09-22 00:18:12 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-09-22 00:18:12 +0000 |
commit | 2c7dd98b8a37e9a4adcaad76423f029ce7a09b77 (patch) | |
tree | 753992220ec17a379cbf572e752547c6360706ee /CMakeLists.txt | |
parent | b67e055cc7546d1c7bde880aa89353bfe6ce49b6 (diff) |
[CMake] More robust handling for bootstrap variables
Checking defined isn't good enough we also need to handle defined to empty string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b7322e279..53e5f33246 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -611,7 +611,11 @@ if (CLANG_ENABLE_BOOTSTRAP) # Populate the passthrough variables foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH}) if(DEFINED ${variableName}) - string(REPLACE ";" "\;" value ${${variableName}}) + if("${${variableName}}" STREQUAL "") + set(value "") + else() + string(REPLACE ";" "\;" value ${${variableName}}) + endif() list(APPEND PASSTHROUGH_VARIABLES -D${variableName}=${value}) endif() |