diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 596fd15..be03e56 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -167,6 +167,7 @@ class cmTargetInternals public: cmStateEnums::TargetType TargetType; cmMakefile* Makefile; + cmPolicies::PolicyMap PolicyMap; cmPropertyMap Properties; std::set<BT<std::string>> Utilities; std::set<std::string> SystemIncludeDirectories; @@ -422,14 +423,14 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, } // Record current policies for later use. - impl->Makefile->RecordPolicies(this->PolicyMap); + impl->Makefile->RecordPolicies(impl->PolicyMap); if (impl->TargetType == cmStateEnums::INTERFACE_LIBRARY) { // This policy is checked in a few conditions. The properties relevant // to the policy are always ignored for cmStateEnums::INTERFACE_LIBRARY // targets, // so ensure that the conditions don't lead to nonsense. - this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); + impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && @@ -478,6 +479,17 @@ cmMakefile* cmTarget::GetMakefile() const return impl->Makefile; } +cmPolicies::PolicyMap const& cmTarget::GetPolicyMap() const +{ + return impl->PolicyMap; +} + +cmPolicies::PolicyStatus cmTarget::GetPolicyStatus( + cmPolicies::PolicyID policy) const +{ + return impl->PolicyMap.Get(policy); +} + cmGlobalGenerator* cmTarget::GetGlobalGenerator() const { return impl->Makefile->GetGlobalGenerator(); |