summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-05-09 12:25:45 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-05-09 12:25:45 (GMT)
commit7f11536704d9f971cf5c8b0a2b490ccc6af58588 (patch)
tree05b5b24050a629bf9ceb59d743f77ca909448229 /Source/cmGlobalGenerator.cxx
parent5af310502142252995ad5d74e66355be4094b7cc (diff)
downloadCMake-7f11536704d9f971cf5c8b0a2b490ccc6af58588.zip
CMake-7f11536704d9f971cf5c8b0a2b490ccc6af58588.tar.gz
CMake-7f11536704d9f971cf5c8b0a2b490ccc6af58588.tar.bz2
ENH: now target names can be used in add_custom_command() and
add_custom_target() as COMMAND, and cmake will recognize them and replace them with the actual output path of these executables. Also the dependency will be added automatically. Test included. ENH: moved TraceVSDependencies() to the end of GlobalGenerator::Configure(), so it is done now in one central place Alex
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a0e66d3..1691308 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -718,6 +718,13 @@ void cmGlobalGenerator::Configure()
// at this point this->LocalGenerators has been filled,
// so create the map from project name to vector of local generators
this->FillProjectMap();
+ // now create project to target map
+ // This will make sure that targets have all the
+ // targets they depend on as part of the build.
+ this->FillProjectToTargetMap();
+ // now trace all dependencies
+ this->TraceDependencies();
+
if ( !this->CMakeInstance->GetScriptMode() )
{
this->CMakeInstance->UpdateProgress("Configuring done", -1);
@@ -1036,6 +1043,13 @@ const char* cmGlobalGenerator::GetLinkerPreference(const char* lang)
return "None";
}
+void cmGlobalGenerator::TraceDependencies()
+{
+ for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+ {
+ this->LocalGenerators[i]->TraceDependencies();
+ }
+}
void cmGlobalGenerator::FillProjectMap()
{
@@ -1057,10 +1071,6 @@ void cmGlobalGenerator::FillProjectMap()
}
while (lg);
}
- // now create project to target map
- // This will make sure that targets have all the
- // targets they depend on as part of the build.
- this->FillProjectToTargetMap();
}