summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorExpressionNode.cxx4
-rw-r--r--Source/cmLocalGenerator.cxx10
-rw-r--r--Source/cmLocalGenerator.h2
3 files changed, 12 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 7a7e4ffb35..03f8d3f079 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -393,7 +393,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
if (cmsysString_strcasecmp(parameters.begin()->c_str(), compilerId) == 0)
{
- switch(context->LG->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0044))
+ switch(context->LG->GetPolicyStatus(cmPolicies::CMP0044))
{
case cmPolicies::WARN:
{
@@ -1100,7 +1100,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
"COMPILE_DEFINITIONS_"))
{
cmPolicies::PolicyStatus polSt =
- context->LG->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0043);
+ context->LG->GetPolicyStatus(cmPolicies::CMP0043);
if (polSt == cmPolicies::WARN || polSt == cmPolicies::OLD)
{
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c37417ddfd..5f0242ec59 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2201,7 +2201,7 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared,
if (flags && flags != originalFlags)
{
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0018))
+ switch (this->GetPolicyStatus(cmPolicies::CMP0018))
{
case cmPolicies::WARN:
{
@@ -2949,7 +2949,7 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4()
{
// Check the policy to decide whether to pay attention to this
// variable.
- switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0001))
+ switch(this->GetPolicyStatus(cmPolicies::CMP0001))
{
case cmPolicies::WARN:
// WARN is just OLD without warning because user code does not
@@ -2976,6 +2976,12 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4()
actual_compat <= CMake_VERSION_ENCODE(2, 4, 255));
}
+cmPolicies::PolicyStatus
+cmLocalGenerator::GetPolicyStatus(cmPolicies::PolicyID id) const
+{
+ return this->Makefile->GetPolicyStatus(id);
+}
+
//----------------------------------------------------------------------------
bool cmLocalGenerator::CheckDefinition(std::string const& define) const
{
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 552020baf0..6380db661e 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -265,6 +265,8 @@ public:
*/
bool NeedBackwardsCompatibility_2_4();
+ cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id) const;
+
cmake* GetCMakeInstance() const;
const char* GetSourceDirectory() const;