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})


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to