summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-07 19:01:46 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-09 20:16:02 (GMT)
commit3baaf6ccecb9117b613fc89cd37206960298dfaa (patch)
tree12e5a8e3b6df8faed7a386500768f008f6cf3ce6 /Source/cmGlobalGenerator.cxx
parent62a841b80b5f4b4f9cc0ddba77ae010a29b0e27e (diff)
downloadCMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.zip
CMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.tar.gz
CMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.tar.bz2
Pre-compute object file names before Makefile generation
Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked during cmGeneratorTarget construction. Implement it in the Makefile generator to pre-compute all object file names for each target. Use the results during generation instead of re-computing it later.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a1f80d9..d7ba8b6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1074,7 +1074,9 @@ void cmGlobalGenerator::CreateGeneratorTargets()
ti != targets.end(); ++ti)
{
cmTarget* t = &ti->second;
- this->GeneratorTargets[t] = new cmGeneratorTarget(t);
+ cmGeneratorTarget* gt = new cmGeneratorTarget(t);
+ this->GeneratorTargets[t] = gt;
+ this->ComputeTargetObjects(gt);
}
}
}
@@ -1104,6 +1106,12 @@ cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget* t) const
return ti->second;
}
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget*) const
+{
+ // Implemented in generator subclasses that need this.
+}
+
void cmGlobalGenerator::CheckLocalGenerators()
{
std::map<cmStdString, cmStdString> notFoundMap;