diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 16:38:20 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 21:22:34 (GMT) |
commit | afc4612fa57da09748745fefac02a2086f374db1 (patch) | |
tree | efafdc08c8006bf4707fe008742073829010917c /Source/cmTarget.cxx | |
parent | 72b0eeeb21807132e110011add7a243a01653f83 (diff) | |
download | CMake-afc4612fa57da09748745fefac02a2086f374db1.zip CMake-afc4612fa57da09748745fefac02a2086f374db1.tar.gz CMake-afc4612fa57da09748745fefac02a2086f374db1.tar.bz2 |
cmTarget: Move member method `ProcessSourceItemCMP0049()` to impl
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 16c1e05..c4cff52 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -205,6 +205,9 @@ public: std::vector<std::pair<cmTarget::TLLSignature, cmListFileContext>> TLLCommands; cmListFileBacktrace Backtrace; + +public: + std::string ProcessSourceItemCMP0049(const std::string& s); }; cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, @@ -607,7 +610,7 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) for (auto filename : srcs) { if (!cmGeneratorExpression::StartsWithGeneratorExpression(filename)) { if (!filename.empty()) { - filename = this->ProcessSourceItemCMP0049(filename); + filename = impl->ProcessSourceItemCMP0049(filename); if (filename.empty()) { return; } @@ -625,18 +628,18 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) } } -std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) +std::string cmTargetInternals::ProcessSourceItemCMP0049(const std::string& s) { std::string src = s; // For backwards compatibility replace variables in source names. // This should eventually be removed. - impl->Makefile->ExpandVariablesInString(src); + this->Makefile->ExpandVariablesInString(src); if (src != s) { std::ostringstream e; bool noMessage = false; MessageType messageType = MessageType::AUTHOR_WARNING; - switch (impl->Makefile->GetPolicyStatus(cmPolicies::CMP0049)) { + switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0049)) { case cmPolicies::WARN: e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0049) << "\n"; break; @@ -650,10 +653,10 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) } if (!noMessage) { e << "Legacy variable expansion in source file \"" << s - << "\" expanded to \"" << src << "\" in target \"" << this->GetName() + << "\" expanded to \"" << src << "\" in target \"" << this->Name << "\". This behavior will be removed in a " "future version of CMake."; - impl->Makefile->IssueMessage(messageType, e.str()); + this->Makefile->IssueMessage(messageType, e.str()); if (messageType == MessageType::FATAL_ERROR) { return ""; } @@ -664,7 +667,7 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s) { - std::string src = this->ProcessSourceItemCMP0049(s); + std::string src = impl->ProcessSourceItemCMP0049(s); if (!s.empty() && src.empty()) { return nullptr; } |