summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-03 08:10:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-04 20:32:19 (GMT)
commite3a8c0291e6ae364365bfe48f12c6a5f4ec0e76f (patch)
tree528e6a189302ac01af386c9db055588f279f4472 /Source/cmPolicies.cxx
parentcb765af0499d1ad51b7e4d3ff45f1e40d6ca843b (diff)
downloadCMake-e3a8c0291e6ae364365bfe48f12c6a5f4ec0e76f.zip
CMake-e3a8c0291e6ae364365bfe48f12c6a5f4ec0e76f.tar.gz
CMake-e3a8c0291e6ae364365bfe48f12c6a5f4ec0e76f.tar.bz2
cmPolicies: Make private method file-static.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index c1a2d2f..acb591b 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -467,6 +467,31 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
}
//----------------------------------------------------------------------------
+static void DiagnoseAncientPolicies(
+ std::vector<cmPolicies::PolicyID> const& ancient,
+ unsigned int majorVer,
+ unsigned int minorVer,
+ unsigned int patchVer,
+ cmMakefile* mf)
+{
+ std::ostringstream e;
+ e << "The project requests behavior compatible with CMake version \""
+ << majorVer << "." << minorVer << "." << patchVer
+ << "\", which requires the OLD behavior for some policies:\n";
+ for(std::vector<cmPolicies::PolicyID>::const_iterator
+ i = ancient.begin(); i != ancient.end(); ++i)
+ {
+ e << " " << idToString(*i) << ": " << idToShortDescription(*i) << "\n";
+ }
+ e << "However, this version of CMake no longer supports the OLD "
+ << "behavior for these policies. "
+ << "Please either update your CMakeLists.txt files to conform to "
+ << "the new behavior or use an older version of CMake that still "
+ << "supports the old behavior.";
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+}
+
+//----------------------------------------------------------------------------
static bool GetPolicyDefault(cmMakefile* mf, std::string const& policy,
cmPolicies::PolicyStatus* defaultSetting)
{
@@ -589,8 +614,8 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
// Make sure the project does not use any ancient policies.
if(!ancientPolicies.empty())
{
- this->DiagnoseAncientPolicies(ancientPolicies,
- majorVer, minorVer, patchVer, mf);
+ DiagnoseAncientPolicies(ancientPolicies,
+ majorVer, minorVer, patchVer, mf);
cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -671,28 +696,3 @@ cmPolicies::GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id)
<< "Run cmake --help-policy " << pid << " for more information.";
return e.str();
}
-
-//----------------------------------------------------------------------------
-void
-cmPolicies::DiagnoseAncientPolicies(std::vector<PolicyID> const& ancient,
- unsigned int majorVer,
- unsigned int minorVer,
- unsigned int patchVer,
- cmMakefile* mf)
-{
- std::ostringstream e;
- e << "The project requests behavior compatible with CMake version \""
- << majorVer << "." << minorVer << "." << patchVer
- << "\", which requires the OLD behavior for some policies:\n";
- for(std::vector<PolicyID>::const_iterator
- i = ancient.begin(); i != ancient.end(); ++i)
- {
- e << " " << idToString(*i) << ": " << idToShortDescription(*i) << "\n";
- }
- e << "However, this version of CMake no longer supports the OLD "
- << "behavior for these policies. "
- << "Please either update your CMakeLists.txt files to conform to "
- << "the new behavior or use an older version of CMake that still "
- << "supports the old behavior.";
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
-}