Bladeren bron

exports: store pointers to all installations of each export set

This information will be used to check whether a target is exported
once or multiple times and to check its namespace.

Alex
Alex Neundorf 13 jaren geleden
bovenliggende
commit
999061a4c2
3 gewijzigde bestanden met toevoegingen van 14 en 0 verwijderingen
  1. 5 0
      Source/cmExportSet.cxx
  2. 8 0
      Source/cmExportSet.h
  3. 1 0
      Source/cmInstallExportGenerator.cxx

+ 5 - 0
Source/cmExportSet.cxx

@@ -25,3 +25,8 @@ void cmExportSet::AddTargetExport(cmTargetExport const* te)
 {
   this->TargetExports.push_back(te);
 }
+
+void cmExportSet::AddInstallation(cmInstallExportGenerator const* installation)
+{
+  this->Installations.push_back(installation);
+}

+ 8 - 0
Source/cmExportSet.h

@@ -14,6 +14,7 @@
 
 #include "cmSystemTools.h"
 class cmTargetExport;
+class cmInstallExportGenerator;
 
 /// A set of targets that were installed with the same EXPORT parameter.
 class cmExportSet
@@ -26,13 +27,20 @@ public:
 
   void AddTargetExport(cmTargetExport const* tgt);
 
+  void AddInstallation(cmInstallExportGenerator const* installation);
+
   std::string const& GetName() const { return this->Name; }
+
   std::vector<cmTargetExport const*> const* GetTargetExports() const
      { return &this->TargetExports; }
 
+  std::vector<cmInstallExportGenerator const*> const* GetInstallations() const
+     { return &this->Installations; }
+
 private:
   std::vector<cmTargetExport const*> TargetExports;
   std::string Name;
+  std::vector<cmInstallExportGenerator const*> Installations;
 };
 
 #endif

+ 1 - 0
Source/cmInstallExportGenerator.cxx

@@ -42,6 +42,7 @@ cmInstallExportGenerator::cmInstallExportGenerator(
   ,Makefile(mf)
 {
   this->EFGen = new cmExportInstallFileGenerator(this);
+  exportSet->AddInstallation(this);
 }
 
 //----------------------------------------------------------------------------