summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-14 17:04:25 (GMT)
committerStephen Kelly <steveire@gmail.com>2012-09-19 13:30:49 (GMT)
commit987e12e2f962b6e9ed9f15f8ff486512911b744e (patch)
tree8d93e37c9e1893a15eda470c04111e679f4c0c3d /Source
parent14bf7783f4de829f62041d1dbf3989160820b2b7 (diff)
downloadCMake-987e12e2f962b6e9ed9f15f8ff486512911b744e.zip
CMake-987e12e2f962b6e9ed9f15f8ff486512911b744e.tar.gz
CMake-987e12e2f962b6e9ed9f15f8ff486512911b744e.tar.bz2
Move GenerateTargetManifest to cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx72
-rw-r--r--Source/cmGeneratorTarget.h3
-rw-r--r--Source/cmLocalGenerator.cxx7
-rw-r--r--Source/cmTarget.cxx70
-rw-r--r--Source/cmTarget.h3
5 files changed, 79 insertions, 76 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e0272fb..d77e47b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -205,3 +205,75 @@ void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs)
}
}
}
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::GenerateTargetManifest(const char* config)
+{
+ cmMakefile* mf = this->Target->GetMakefile();
+ cmLocalGenerator* lg = mf->GetLocalGenerator();
+ cmGlobalGenerator* gg = lg->GetGlobalGenerator();
+
+ // Get the names.
+ std::string name;
+ std::string soName;
+ std::string realName;
+ std::string impName;
+ std::string pdbName;
+ if(this->GetType() == cmTarget::EXECUTABLE)
+ {
+ this->Target->GetExecutableNames(name, realName, impName, pdbName,
+ config);
+ }
+ else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
+ this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ this->Target->GetLibraryNames(name, soName, realName, impName, pdbName,
+ config);
+ }
+ else
+ {
+ return;
+ }
+
+ // Get the directory.
+ std::string dir = this->Target->GetDirectory(config, false);
+
+ // Add each name.
+ std::string f;
+ if(!name.empty())
+ {
+ f = dir;
+ f += "/";
+ f += name;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!soName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += soName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!realName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += realName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!pdbName.empty())
+ {
+ f = dir;
+ f += "/";
+ f += pdbName;
+ gg->AddToManifest(config? config:"", f);
+ }
+ if(!impName.empty())
+ {
+ f = this->Target->GetDirectory(config, true);
+ f += "/";
+ f += impName;
+ gg->AddToManifest(config? config:"", f);
+ }
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index c19ef7d..12aa971 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -58,6 +58,9 @@ public:
void UseObjectLibraries(std::vector<std::string>& objs);
+ /** Add the target output files to the global generator manifest. */
+ void GenerateTargetManifest(const char* config);
+
private:
void ClassifySources();
void LookupObjectLibraries();
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cf2af0a..6239557 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -533,10 +533,11 @@ void cmLocalGenerator::GenerateTargetManifest()
this->Makefile->GetConfigurations(configNames);
// Add our targets to the manifest for each configuration.
- cmTargets& targets = this->Makefile->GetTargets();
- for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+ cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
+ for(cmGeneratorTargetsType::iterator t = targets.begin();
+ t != targets.end(); ++t)
{
- cmTarget& target = t->second;
+ cmGeneratorTarget& target = *t->second;
if(configNames.empty())
{
target.GenerateTargetManifest(0);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9a3812c..d95b1ef 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3515,76 +3515,6 @@ bool cmTarget::GetImplibGNUtoMS(std::string const& gnuName,
}
//----------------------------------------------------------------------------
-void cmTarget::GenerateTargetManifest(const char* config)
-{
- cmMakefile* mf = this->Makefile;
- cmLocalGenerator* lg = mf->GetLocalGenerator();
- cmGlobalGenerator* gg = lg->GetGlobalGenerator();
-
- // Get the names.
- std::string name;
- std::string soName;
- std::string realName;
- std::string impName;
- std::string pdbName;
- if(this->GetType() == cmTarget::EXECUTABLE)
- {
- this->GetExecutableNames(name, realName, impName, pdbName, config);
- }
- else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
- this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->GetType() == cmTarget::MODULE_LIBRARY)
- {
- this->GetLibraryNames(name, soName, realName, impName, pdbName, config);
- }
- else
- {
- return;
- }
-
- // Get the directory.
- std::string dir = this->GetDirectory(config, false);
-
- // Add each name.
- std::string f;
- if(!name.empty())
- {
- f = dir;
- f += "/";
- f += name;
- gg->AddToManifest(config? config:"", f);
- }
- if(!soName.empty())
- {
- f = dir;
- f += "/";
- f += soName;
- gg->AddToManifest(config? config:"", f);
- }
- if(!realName.empty())
- {
- f = dir;
- f += "/";
- f += realName;
- gg->AddToManifest(config? config:"", f);
- }
- if(!pdbName.empty())
- {
- f = dir;
- f += "/";
- f += pdbName;
- gg->AddToManifest(config? config:"", f);
- }
- if(!impName.empty())
- {
- f = this->GetDirectory(config, true);
- f += "/";
- f += impName;
- gg->AddToManifest(config? config:"", f);
- }
-}
-
-//----------------------------------------------------------------------------
void cmTarget::SetPropertyDefault(const char* property,
const char* default_value)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 98eaeec..e9fceb3 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -381,9 +381,6 @@ public:
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
const char* newExt = 0);
- /** Add the target output files to the global generator manifest. */
- void GenerateTargetManifest(const char* config);
-
/**
* Compute whether this target must be relinked before installing.
*/