summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMartin Duffy <martin.duffy@kitware.com>2023-11-13 01:01:30 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-13 16:11:18 (GMT)
commit27244a8f7385b97c38052495495a1e5aca11c485 (patch)
tree7374be606cdc332bb583ea3ca866bfd1166f8ac8 /Source
parentd36d2b9253d53060c34e3a215a1e8ae8c60bdfdd (diff)
downloadCMake-27244a8f7385b97c38052495495a1e5aca11c485.zip
CMake-27244a8f7385b97c38052495495a1e5aca11c485.tar.gz
CMake-27244a8f7385b97c38052495495a1e5aca11c485.tar.bz2
cmGeneratorExpressionNode: Fix short-circuit logic
Fix logic added by commit 634079b86d (cmGeneratorExpressionEvaluator: Short-circuit boolean operators, 2023-09-11, v3.28.0-rc1~47^2) and add missing test cases. Fixes: #25412
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 57beb72..c8147b2 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -131,7 +131,7 @@ struct BooleanOpNode : public cmGeneratorExpressionNode
bool ShouldEvaluateNextParameter(const std::vector<std::string>& parameters,
std::string& def_value) const override
{
- if (!parameters.empty() && parameters[0] == failureVal) {
+ if (!parameters.empty() && parameters.back() == failureVal) {
def_value = failureVal;
return false;
}