summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-16 17:19:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-16 18:24:44 (GMT)
commit14272277205ac7927a4c13b628ce411538f7b17c (patch)
treee85181d11825c7c6a6a4cf9af14df92eb53e1069 /Source/cmTarget.cxx
parent8f363d6771dfa792d606978e1e406229637078f6 (diff)
downloadCMake-14272277205ac7927a4c13b628ce411538f7b17c.zip
CMake-14272277205ac7927a4c13b628ce411538f7b17c.tar.gz
CMake-14272277205ac7927a4c13b628ce411538f7b17c.tar.bz2
cmGeneratorTarget: Move CheckCMP0004 from cmTarget.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx57
1 files changed, 0 insertions, 57 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 55a9c49..7f21efe 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2368,63 +2368,6 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config,
}
//----------------------------------------------------------------------------
-std::string cmTarget::CheckCMP0004(std::string const& item) const
-{
- // Strip whitespace off the library names because we used to do this
- // in case variables were expanded at generate time. We no longer
- // do the expansion but users link to libraries like " ${VAR} ".
- std::string lib = item;
- std::string::size_type pos = lib.find_first_not_of(" \t\r\n");
- if(pos != lib.npos)
- {
- lib = lib.substr(pos, lib.npos);
- }
- pos = lib.find_last_not_of(" \t\r\n");
- if(pos != lib.npos)
- {
- lib = lib.substr(0, pos+1);
- }
- if(lib != item)
- {
- cmake* cm = this->Makefile->GetCMakeInstance();
- switch(this->GetPolicyStatusCMP0004())
- {
- case cmPolicies::WARN:
- {
- std::ostringstream w;
- w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0004) << "\n"
- << "Target \"" << this->GetName() << "\" links to item \""
- << item << "\" which has leading or trailing whitespace.";
- cm->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
- this->GetBacktrace());
- }
- case cmPolicies::OLD:
- break;
- case cmPolicies::NEW:
- {
- std::ostringstream e;
- e << "Target \"" << this->GetName() << "\" links to item \""
- << item << "\" which has leading or trailing whitespace. "
- << "This is now an error according to policy CMP0004.";
- cm->IssueMessage(cmake::FATAL_ERROR, e.str(), this->GetBacktrace());
- }
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- {
- std::ostringstream e;
- e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0004) << "\n"
- << "Target \"" << this->GetName() << "\" links to item \""
- << item << "\" which has leading or trailing whitespace.";
- cm->IssueMessage(cmake::FATAL_ERROR, e.str(), this->GetBacktrace());
- }
- break;
- }
- }
- return lib;
-}
-
-//----------------------------------------------------------------------------
cmTargetInternalPointer::cmTargetInternalPointer()
{
this->Pointer = new cmTargetInternals;