diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 17:38:20 +0100 |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-23 22:22:34 +0100 |
commit | afc4612fa57da09748745fefac02a2086f374db1 (patch) | |
tree | efafdc08c8006bf4707fe008742073829010917c | |
parent | 72b0eeeb21807132e110011add7a243a01653f83 (diff) | |
download | cmake-afc4612fa57da09748745fefac02a2086f374db1.tar.gz |
cmTarget: Move member method `ProcessSourceItemCMP0049()` to impl
-rw-r--r-- | Source/cmTarget.cxx | 17 | ||||
-rw-r--r-- | Source/cmTarget.h | 7 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 16c1e05c4e..c4cff52008 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; } diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 7937969f49..a4696c85dd 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -43,8 +43,7 @@ private: /** \class cmTarget * \brief Represent a library or executable target loaded from a makefile. * - * cmTarget represents a target loaded from - * a makefile. + * cmTarget represents a target loaded from a makefile. */ class cmTarget { @@ -273,9 +272,7 @@ private: private: cmTargetInternalPointer impl; - std::string ProcessSourceItemCMP0049(const std::string& s); - - /** Return whether or not the target has a DLL import library. */ + ///! Return whether or not the target has a DLL import library. bool HasImportLibrary() const; // Internal representation details. |