summaryrefslogtreecommitdiffstats
path: root/Source/cmConditionEvaluator.cxx
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-05-23 09:46:23 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-23 13:08:51 (GMT)
commitcb19a634994aec41a070633e2b574bee4a5c5568 (patch)
tree6597f5c806d3bea531f20ecc37910a7b664778ce /Source/cmConditionEvaluator.cxx
parent9daa244e9904e3d80afa149c927a01413e2a6cd0 (diff)
downloadCMake-cb19a634994aec41a070633e2b574bee4a5c5568.zip
CMake-cb19a634994aec41a070633e2b574bee4a5c5568.tar.gz
CMake-cb19a634994aec41a070633e2b574bee4a5c5568.tar.bz2
cmConditionEvaluator: Reduce the scope of the CMP0064 evaluation
When evaluatig conditions, avoid testing CMP0064 unless it's really needed (Cuz most of the time it doesn't)
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r--Source/cmConditionEvaluator.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 8e479c5..a8a196a 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -526,9 +526,6 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList& newArgs,
bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
MessageType&)
{
- const auto policy64IsOld = this->Policy64Status == cmPolicies::OLD ||
- this->Policy64Status == cmPolicies::WARN;
-
for (auto args = newArgs.make2ArgsIterator(); args.current != newArgs.end();
args.advance(newArgs)) {
@@ -617,7 +614,8 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
}
// does a test exist
else if (this->IsKeyword(keyTEST, *args.current)) {
- if (policy64IsOld) {
+ if (this->Policy64Status == cmPolicies::OLD ||
+ this->Policy64Status == cmPolicies::WARN) {
continue;
}
newArgs.ReduceOneArg(bool(this->Makefile.GetTest(args.next->GetValue())),