From a3a8177eddfdfc89fae9331ca794abbc67f5d543 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 9 Jun 2015 23:55:56 +0200 Subject: [PATCH] cmFileCommand: Fix implementation of CMP0009. --- Source/cmFileCommand.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 469846815..7440357c7 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -906,13 +906,13 @@ bool cmFileCommand::HandleGlobCommand(std::vector const& args, { switch(status) { + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: case cmPolicies::NEW: g.RecurseThroughSymlinksOff(); break; case cmPolicies::OLD: case cmPolicies::WARN: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: g.RecurseThroughSymlinksOn(); break; } @@ -1044,6 +1044,8 @@ bool cmFileCommand::HandleGlobCommand(std::vector const& args, { switch (status) { + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: case cmPolicies::NEW: // Correct behavior, yay! break; @@ -1059,12 +1061,6 @@ bool cmFileCommand::HandleGlobCommand(std::vector const& args, cmPolicies::GetPolicyWarning(cmPolicies::CMP0009)); } break; - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - this->SetError("policy CMP0009 error"); - this->Makefile->IssueMessage(cmake::FATAL_ERROR, - cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0009)); - return false; } }