summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 34b72cb..6dff598 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -888,6 +888,22 @@ void cmGlobalGenerator::FillProjectMap()
}
+///! Find a local generator by its startdirectory
+cmLocalGenerator* cmGlobalGenerator::FindLocalGenerator(const char* start_dir)
+{
+ std::vector<cmLocalGenerator*>* gens = &m_LocalGenerators;
+ for(unsigned int i = 0; i < gens->size(); ++i)
+ {
+ std::string sd = (*gens)[i]->GetMakefile()->GetStartDirectory();
+ if (sd == start_dir)
+ {
+ return (*gens)[i];
+ }
+ }
+ return 0;
+}
+
+
cmTarget* cmGlobalGenerator::FindTarget(const char* project,
const char* name)
{