From: Chris Bieneman Date: Wed, 21 Sep 2016 23:24:15 +0000 (+0000) Subject: [CMake] Check if passthrough variables are defined X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e04ce10186cd87da504c42b3dc463c69a3c4a78;p=clang [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 --- 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})