r282122 - [CMake] Check if passthrough variables are defined

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 16:24:15 PDT 2016


Author: cbieneman
Date: Wed Sep 21 18:24:15 2016
New Revision: 282122

URL: http://llvm.org/viewvc/llvm-project?rev=282122&view=rev
Log:
[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.

Modified:
    cfe/trunk/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=282122&r1=282121&r2=282122&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed Sep 21 18:24:15 2016
@@ -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})




More information about the cfe-commits mailing list