summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx42
1 files changed, 40 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 189f5e4..1835f6d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -21,6 +21,7 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmVersion.h"
+#include "cmInstallExportGenerator.h"
#include <stdlib.h> // required for atof
@@ -56,8 +57,7 @@ cmGlobalGenerator::cmGlobalGenerator()
cmGlobalGenerator::~cmGlobalGenerator()
{
// Delete any existing cmLocalGenerators
- unsigned int i;
- for (i = 0; i < this->LocalGenerators.size(); ++i)
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
delete this->LocalGenerators[i];
}
@@ -67,6 +67,17 @@ cmGlobalGenerator::~cmGlobalGenerator()
{
delete this->ExtraGenerator;
}
+
+ for (std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
+ setIt = this->ExportSets.begin();
+ setIt != this->ExportSets.end();
+ ++setIt)
+ {
+ for (unsigned int i = 0; i < setIt->second.size(); ++i)
+ {
+ delete setIt->second[i];
+ }
+ }
}
// Find the make program for the generator, required for try compiles
@@ -1014,6 +1025,33 @@ void cmGlobalGenerator::AddInstallComponent(const char* component)
}
}
+void cmGlobalGenerator::AddTargetToExports(const char* exportSetName,
+ cmTarget* target,
+ cmInstallTargetGenerator* archive,
+ cmInstallTargetGenerator* runTime,
+ cmInstallTargetGenerator* library)
+{
+ if ((exportSetName) && (*exportSetName) && (target))
+ {
+ cmTargetExport* te = new cmTargetExport(target, archive, runTime, library);
+ this->ExportSets[exportSetName].push_back(te);
+ }
+}
+
+const std::vector<cmTargetExport*>* cmGlobalGenerator::GetExportSet(
+ const char* name) const
+{
+ std::map<cmStdString, std::vector<cmTargetExport*> >::const_iterator
+ exportSetIt = this->ExportSets.find(name);
+ if (exportSetIt != this->ExportSets.end())
+ {
+ return &exportSetIt->second;
+ }
+
+ return 0;
+}
+
+
void cmGlobalGenerator::EnableInstallTarget()
{
this->InstallTargetEnabled = true;