From f6241db3e0b69fbf99835b955b17be0f253a742f Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Sat, 23 Mar 2019 15:53:29 +0100 Subject: cmTarget: Move member `OriginalLinkLibraries` to impl --- Source/cmGeneratorTarget.cxx | 2 +- Source/cmTarget.cxx | 9 ++++++++- Source/cmTarget.h | 17 ++++------------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5916fcc..23b5bcb 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -262,7 +262,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg) this->DLLPlatform = !this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty(); - this->PolicyMap = t->PolicyMap; + this->PolicyMap = t->GetPolicyMap(); } cmGeneratorTarget::~cmGeneratorTarget() diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8244c84..596fd15 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -170,6 +170,7 @@ public: cmPropertyMap Properties; std::set> Utilities; std::set SystemIncludeDirectories; + cmTarget::LinkLibraryVectorType OriginalLinkLibraries; std::vector IncludeDirectoriesEntries; std::vector IncludeDirectoriesBacktraces; std::vector CompileOptionsEntries; @@ -751,6 +752,12 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const } } +cmTarget::LinkLibraryVectorType const& cmTarget::GetOriginalLinkLibraries() + const +{ + return impl->OriginalLinkLibraries; +} + void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, cmTargetLinkLibraryType llt) { @@ -782,7 +789,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, std::string const& lib, return; } - this->OriginalLinkLibraries.emplace_back(lib, llt); + impl->OriginalLinkLibraries.emplace_back(lib, llt); // Add the explicit dependency information for libraries. This is // simply a set of libraries separated by ";". There should always diff --git a/Source/cmTarget.h b/Source/cmTarget.h index f552d23..33439fa 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -116,26 +116,18 @@ public: this->PostBuildCommands.push_back(cmd); } - /** - * Add sources to the target. - */ + ///! Add sources to the target. void AddSources(std::vector const& srcs); void AddTracedSources(std::vector const& srcs); cmSourceFile* AddSourceCMP0049(const std::string& src); cmSourceFile* AddSource(const std::string& src, bool before = false); - //* how we identify a library, by name and type + ///! how we identify a library, by name and type typedef std::pair LibraryID; - typedef std::vector LinkLibraryVectorType; - const LinkLibraryVectorType& GetOriginalLinkLibraries() const - { - return this->OriginalLinkLibraries; - } + LinkLibraryVectorType const& GetOriginalLinkLibraries() const; - /** - * Clear the dependency information recorded for this target, if any. - */ + ///! Clear the dependency information recorded for this target, if any. void ClearDependencyInformation(cmMakefile& mf); void AddLinkLibrary(cmMakefile& mf, const std::string& lib, @@ -307,7 +299,6 @@ private: std::vector PreLinkCommands; std::vector PostBuildCommands; std::vector> TLLCommands; - LinkLibraryVectorType OriginalLinkLibraries; cmTargetInternalPointer impl; bool HaveInstallRule; bool DLLPlatform; -- cgit v0.12