Author: cbieneman Date: Wed Sep 21 19:18:12 2016 New Revision: 282125 URL: http://llvm.org/viewvc/llvm-project?rev=282125&view=rev Log: [CMake] More robust handling for bootstrap variables
Checking defined isn't good enough we also need to handle defined to empty string. Modified: cfe/trunk/CMakeLists.txt Modified: cfe/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=282125&r1=282124&r2=282125&view=diff ============================================================================== --- cfe/trunk/CMakeLists.txt (original) +++ cfe/trunk/CMakeLists.txt Wed Sep 21 19:18:12 2016 @@ -611,7 +611,11 @@ if (CLANG_ENABLE_BOOTSTRAP) # Populate the passthrough variables foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH}) if(DEFINED ${variableName}) - string(REPLACE ";" "\;" value ${${variableName}}) + if("${${variableName}}" STREQUAL "") + set(value "") + else() + string(REPLACE ";" "\;" value ${${variableName}}) + endif() list(APPEND PASSTHROUGH_VARIABLES -D${variableName}=${value}) endif() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits