mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 21:40:15 +08:00
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)
This commit is contained in:
@@ -526,9 +526,6 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList& newArgs,
|
|||||||
bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
||||||
MessageType&)
|
MessageType&)
|
||||||
{
|
{
|
||||||
const auto policy64IsOld = this->Policy64Status == cmPolicies::OLD ||
|
|
||||||
this->Policy64Status == cmPolicies::WARN;
|
|
||||||
|
|
||||||
for (auto args = newArgs.make2ArgsIterator(); args.current != newArgs.end();
|
for (auto args = newArgs.make2ArgsIterator(); args.current != newArgs.end();
|
||||||
args.advance(newArgs)) {
|
args.advance(newArgs)) {
|
||||||
|
|
||||||
@@ -617,7 +614,8 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&,
|
|||||||
}
|
}
|
||||||
// does a test exist
|
// does a test exist
|
||||||
else if (this->IsKeyword(keyTEST, *args.current)) {
|
else if (this->IsKeyword(keyTEST, *args.current)) {
|
||||||
if (policy64IsOld) {
|
if (this->Policy64Status == cmPolicies::OLD ||
|
||||||
|
this->Policy64Status == cmPolicies::WARN) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newArgs.ReduceOneArg(bool(this->Makefile.GetTest(args.next->GetValue())),
|
newArgs.ReduceOneArg(bool(this->Makefile.GetTest(args.next->GetValue())),
|
||||||
|
Reference in New Issue
Block a user