1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExternalMakefileProjectGenerator.h,v $
6 Date: $Date: 2007-06-13 16:52:29 $
7 Version: $Revision: 1.3 $
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 =========================================================================*/
17 #ifndef cmExternalMakefileProjectGenerator_h
18 #define cmExternalMakefileProjectGenerator_h
20 #include "cmStandardIncludes.h"
22 #include "cmDocumentation.h"
24 class cmGlobalGenerator
;
26 /** \class cmExternalMakefileProjectGenerator
27 * \brief Base class for generators for "External Makefile based IDE projects".
29 * cmExternalMakefileProjectGenerator is a base class for generators
30 * for "external makefile based projects", i.e. IDE projects which work
31 * an already existing makefiles.
32 * See cmGlobalKdevelopGenerator as an example.
33 * After the makefiles have been generated by one of the Makefile
34 * generators, the Generate() method is called and this generator
35 * can iterate over the local generators and/or projects to produce the
36 * project files for the IDE.
38 class cmExternalMakefileProjectGenerator
42 virtual ~cmExternalMakefileProjectGenerator() {}
44 ///! Get the name for this generator.
45 virtual const char* GetName() const = 0;
46 /** Get the documentation entry for this generator. */
47 virtual void GetDocumentation(cmDocumentationEntry
& entry
,
48 const char* fullName
) const = 0;
50 ///! set the global generator which will generate the makefiles
51 virtual void SetGlobalGenerator(cmGlobalGenerator
* generator
)
52 {this->GlobalGenerator
= generator
;}
54 ///! Return the list of global generators supported by this extra generator
55 const std::vector
<std::string
>& GetSupportedGlobalGenerators() const
56 {return this->SupportedGlobalGenerators
;}
58 ///! Get the name of the global generator for the given full name
59 const char* GetGlobalGeneratorName(const char* fullName
);
60 /** Create a full name from the given global generator name and the
61 * extra generator name
63 static std::string
CreateFullGeneratorName(const char* globalGenerator
,
64 const char* extraGenerator
);
66 ///! Generate the project files, the Makefiles have already been generated
67 virtual void Generate() = 0;
69 ///! Contains the names of the global generators support by this generator.
70 std::vector
<std::string
> SupportedGlobalGenerators
;
71 ///! the global generator which creates the makefiles
72 const cmGlobalGenerator
* GlobalGenerator
;