summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-09-21 23:24:15 +0000
committerChris Bieneman <beanz@apple.com>2016-09-21 23:24:15 +0000
commit1e04ce10186cd87da504c42b3dc463c69a3c4a78 (patch)
treeaccb63ee3cbd5dbbf10e8055f6a350626e1ad958
parent29d34c9a97824b10717654a125810ecb10b90305 (diff)
downloadclang-1e04ce10186cd87da504c42b3dc463c69a3c4a78.tar.gz
[CMake] Check if passthrough variables are defined
Checking if they evaluate to true cases prevents passing values that evaluate to false cases. Instead we should check if the variables are defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282122 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12f79df6e2..9b7322e279 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -610,7 +610,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
# Populate the passthrough variables
foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH})
- if(${variableName})
+ if(DEFINED ${variableName})
string(REPLACE ";" "\;" value ${${variableName}})
list(APPEND PASSTHROUGH_VARIABLES
-D${variableName}=${value})