diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-06 00:04:12 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-25 12:48:37 (GMT) |
commit | d0dcce15f4cc4e7c100556fbd016c59f64d0d238 (patch) | |
tree | 799d4327e5aefe8c02ee93dc3cb5a2cb148f25c0 | |
parent | 658bfc5c525bd21ecd68847cd19bda7102245c35 (diff) | |
download | CMake-d0dcce15f4cc4e7c100556fbd016c59f64d0d238.zip CMake-d0dcce15f4cc4e7c100556fbd016c59f64d0d238.tar.gz CMake-d0dcce15f4cc4e7c100556fbd016c59f64d0d238.tar.bz2 |
cmMakefile: Simplify computation of ancient policy status.
-rw-r--r-- | Source/cmMakefile.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ab8499f..d6854e7 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4743,6 +4743,13 @@ cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const { cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); + + if(status == cmPolicies::REQUIRED_ALWAYS || + status == cmPolicies::REQUIRED_IF_USED) + { + return status; + } + cmLocalGenerator* lg = this->LocalGenerator; while(lg) { @@ -4758,20 +4765,6 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const } lg = lg->GetParent(); } - - // If the policy is required to be set to NEW but is not, ignore the - // current setting and tell the caller. - if(status != cmPolicies::NEW) - { - cmPolicies::PolicyStatus def = cmPolicies::GetPolicyStatus(id); - if(def == cmPolicies::REQUIRED_ALWAYS || - def == cmPolicies::REQUIRED_IF_USED) - { - return def; - } - } - - // The current setting is okay. return status; } |