diff options
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 93072f5..a420f59 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -343,6 +343,27 @@ cmPolicies::cmPolicies() CMP0050, "CMP0050", "Disallow add_custom_command SOURCE signatures.", 3,0,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0051, "CMP0051", + "List TARGET_OBJECTS in SOURCES target property.", + 3,1,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0052, "CMP0052", + "Reject source and build dirs in installed " + "INTERFACE_INCLUDE_DIRECTORIES.", + 3,1,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0053, "CMP0053", + "Simplify variable reference and escape sequence evaluation.", + 3,1,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0054, "CMP0054", + "Only interpret if() arguments as variables or keywords when unquoted.", + 3,1,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() @@ -488,7 +509,7 @@ bool cmPolicies::GetPolicyDefault(cmMakefile* mf, std::string const& policy, cmPolicies::PolicyStatus* defaultSetting) { std::string defaultVar = "CMAKE_POLICY_DEFAULT_" + policy; - std::string defaultValue = mf->GetSafeDefinition(defaultVar.c_str()); + std::string defaultValue = mf->GetSafeDefinition(defaultVar); if(defaultValue == "NEW") { *defaultSetting = cmPolicies::NEW; @@ -506,7 +527,7 @@ bool cmPolicies::GetPolicyDefault(cmMakefile* mf, std::string const& policy, cmOStringStream e; e << defaultVar << " has value \"" << defaultValue << "\" but must be \"OLD\", \"NEW\", or \"\" (empty)."; - mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str()); + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); return false; } @@ -651,5 +672,5 @@ cmPolicies::DiagnoseAncientPolicies(std::vector<PolicyID> const& ancient, << "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().c_str()); + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); } |