diff options
author | Chris Bieneman <beanz@apple.com> | 2016-09-21 23:24:15 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-09-21 23:24:15 +0000 |
commit | 1e04ce10186cd87da504c42b3dc463c69a3c4a78 (patch) | |
tree | accb63ee3cbd5dbbf10e8055f6a350626e1ad958 | |
parent | 29d34c9a97824b10717654a125810ecb10b90305 (diff) | |
download | clang-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.txt | 2 |
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}) |