summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmAddCustomTargetCommand.cxx1
-rw-r--r--Source/cmMakefile.cxx3
2 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index aaa2af0..3d9c1fe 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -48,6 +48,7 @@ bool cmAddCustomTargetCommand
return false;
break;
case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
this->SetError(
this->Makefile->GetPolicies()->GetRequiredPolicyError
(cmPolicies::CMP_0001).c_str());
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 18348c1..f86fbb8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3149,6 +3149,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
case cmPolicies::OLD:
return true;
case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
msg = this->GetPolicies()->
GetRequiredPolicyError(cmPolicies::CMP_0002);
return false;
@@ -3235,7 +3236,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
cmPolicies::PolicyStatus cmMakefile
::GetPolicyStatus(cmPolicies::PolicyID id)
{
- cmPolicies::PolicyStatus status;
+ cmPolicies::PolicyStatus status = cmPolicies::REQUIRED_IF_USED;
PolicyMap::iterator mappos;
unsigned int vecpos;
bool done = false;