diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-09-13 14:39:42 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-09-13 14:39:42 (GMT) |
commit | 2a45d5cd684c835f6e97c28ef997ef5824f4827d (patch) | |
tree | 03d597745a3d1cb9c7b7923ca60c6ae420eee04e /Source/cmGlobalGenerator.cxx | |
parent | c09a1fa7993fae6e2f73be8a82677529c29b8c59 (diff) | |
download | CMake-2a45d5cd684c835f6e97c28ef997ef5824f4827d.zip CMake-2a45d5cd684c835f6e97c28ef997ef5824f4827d.tar.gz CMake-2a45d5cd684c835f6e97c28ef997ef5824f4827d.tar.bz2 |
ENH: added DIRECTORY option to GET_DIRECTORY_PROPERTIES
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 16 |
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) { |