1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExternalMakefileProjectGenerator.cxx,v $
6 Date: $Date: 2007-07-03 20:10:50 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
20 #include "cmExternalMakefileProjectGenerator.h"
22 std::string
cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
23 const char* globalGenerator
,
24 const char* extraGenerator
)
29 if (extraGenerator
&& *extraGenerator
)
31 fullName
= extraGenerator
;
34 fullName
+= globalGenerator
;
39 const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
42 // at least one global generator must be supported
43 assert(!this->SupportedGlobalGenerators
.empty());
50 std::string currentName
= fullName
;
51 // if we get only the short name, take the first global generator as default
52 if (currentName
== this->GetName())
54 return this->SupportedGlobalGenerators
[0].c_str();
57 // otherwise search for the matching global generator
58 for (std::vector
<std::string
>::const_iterator
59 it
= this->SupportedGlobalGenerators
.begin();
60 it
!= this->SupportedGlobalGenerators
.end();
63 if (this->CreateFullGeneratorName(it
->c_str(), this->GetName())