From 1e04ce10186cd87da504c42b3dc463c69a3c4a78 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 21 Sep 2016 23:24:15 +0000 Subject: [PATCH] [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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- 2.50.1