Bladeren bron

cmTarget: Move member `OriginalLinkLibraries` to impl

Sebastian Holtermann 6 jaren geleden
bovenliggende
commit
f6241db3e0
3 gewijzigde bestanden met toevoegingen van 13 en 15 verwijderingen
  1. 1 1
      Source/cmGeneratorTarget.cxx
  2. 8 1
      Source/cmTarget.cxx
  3. 4 13
      Source/cmTarget.h

+ 1 - 1
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()

+ 8 - 1
Source/cmTarget.cxx

@@ -170,6 +170,7 @@ public:
   cmPropertyMap Properties;
   std::set<BT<std::string>> Utilities;
   std::set<std::string> SystemIncludeDirectories;
+  cmTarget::LinkLibraryVectorType OriginalLinkLibraries;
   std::vector<std::string> IncludeDirectoriesEntries;
   std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
   std::vector<std::string> 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

+ 4 - 13
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<std::string> const& srcs);
   void AddTracedSources(std::vector<std::string> 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<std::string, cmTargetLinkLibraryType> LibraryID;
-
   typedef std::vector<LibraryID> 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<cmCustomCommand> PreLinkCommands;
   std::vector<cmCustomCommand> PostBuildCommands;
   std::vector<std::pair<TLLSignature, cmListFileContext>> TLLCommands;
-  LinkLibraryVectorType OriginalLinkLibraries;
   cmTargetInternalPointer impl;
   bool HaveInstallRule;
   bool DLLPlatform;