summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-03 16:51:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-04-03 16:51:51 (GMT)
commit93054aa84f283de17c58fa2ee19a2a4a1668027d (patch)
tree8b53dac2eb3a77909458cba210a6873915fb45ab /Source/cmGlobalGenerator.cxx
parent1d4366ffac5814441c440d2832d9d8f187841113 (diff)
parent5de63265e3a22d9a8aa5ad437a5030ccfcbcd02d (diff)
downloadCMake-93054aa84f283de17c58fa2ee19a2a4a1668027d.zip
CMake-93054aa84f283de17c58fa2ee19a2a4a1668027d.tar.gz
CMake-93054aa84f283de17c58fa2ee19a2a4a1668027d.tar.bz2
Merge topic 'target-sources-refactor'
5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources. aa0a3562 cmGeneratorTarget: Compute target objects on demand 042c1c83 cmTarget: Compute languages from object libraries on demand. fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand. c355d108 cmComputeTargetDepends: Track object library depends. e5da9e51 cmTarget: Allow any generator expression in SOURCES property. 5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages 28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand. bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression. 8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES. 4959f341 cmSourceFileLocation: Collapse full path for directory comparisons. fcc92878 cmSourceFileLocation: Remove unused Update method. 59e8740a cmTarget: Remove AddSourceFile method 26d494ba cmTarget: Use string API to add sources to cmTarget objects. d38423ec cmTarget: Add a method to obtain list of filenames for sources. ...
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx56
1 files changed, 8 insertions, 48 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3d291f4..a12b68f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -216,6 +216,11 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file)
return false;
}
+void cmGlobalGenerator::ForceLinkerLanguages()
+{
+
+}
+
bool
cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const
{
@@ -1196,6 +1201,8 @@ void cmGlobalGenerator::Generate()
// Create per-target generator information.
this->CreateGeneratorTargets();
+ this->ForceLinkerLanguages();
+
#ifdef CMAKE_BUILD_WITH_CMAKE
for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
++it)
@@ -1217,8 +1224,6 @@ void cmGlobalGenerator::Generate()
this->LocalGenerators[i]->GenerateTargetManifest();
}
- this->ComputeGeneratorTargetObjects();
-
this->ProcessEvaluationFiles();
// Compute the inter-target dependencies.
@@ -1409,6 +1414,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf)
{
cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t);
+ this->ComputeTargetObjectDirectory(gt);
this->GeneratorTargets[t] = gt;
generatorTargets[t] = gt;
}
@@ -1434,29 +1440,6 @@ void cmGlobalGenerator::CreateGeneratorTargets()
}
}
-//----------------------------------------------------------------------------
-void cmGlobalGenerator::ComputeGeneratorTargetObjects()
-{
- // Construct per-target generator information.
- for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
- {
- cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
- cmGeneratorTargetsType targets = mf->GetGeneratorTargets();
- for(cmGeneratorTargetsType::iterator ti = targets.begin();
- ti != targets.end(); ++ti)
- {
- if (ti->second->Target->IsImported()
- || ti->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- continue;
- }
- cmGeneratorTarget* gt = ti->second;
- this->ComputeTargetObjectDirectory(gt);
- gt->LookupObjectLibraries();
- this->ComputeTargetObjects(gt);
- }
- }
-}
//----------------------------------------------------------------------------
void cmGlobalGenerator::ClearGeneratorMembers()
@@ -1518,29 +1501,6 @@ cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget* gt) const
-{
- std::vector<cmSourceFile const*> objectSources;
- gt->GetObjectSources(objectSources);
-
- std::map<cmSourceFile const*, std::string> mapping;
- for(std::vector<cmSourceFile const*>::const_iterator it
- = objectSources.begin(); it != objectSources.end(); ++it)
- {
- mapping[*it];
- }
-
- gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
-
- for(std::map<cmSourceFile const*, std::string>::const_iterator it
- = mapping.begin(); it != mapping.end(); ++it)
- {
- assert(!it->second.empty());
- gt->AddObject(it->first, it->second);
- }
-}
-
-//----------------------------------------------------------------------------
void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
{
}