1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
14 #include "cmExternalMakefileProjectGenerator.h"
16 std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
17 const char* globalGenerator,
18 const char* extraGenerator)
23 if (extraGenerator && *extraGenerator)
25 fullName = extraGenerator;
28 fullName += globalGenerator;
33 const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
36 // at least one global generator must be supported
37 assert(!this->SupportedGlobalGenerators.empty());
44 std::string currentName = fullName;
45 // if we get only the short name, take the first global generator as default
46 if (currentName == this->GetName())
48 return this->SupportedGlobalGenerators[0].c_str();
51 // otherwise search for the matching global generator
52 for (std::vector<std::string>::const_iterator
53 it = this->SupportedGlobalGenerators.begin();
54 it != this->SupportedGlobalGenerators.end();
57 if (this->CreateFullGeneratorName(it->c_str(), this->GetName())