diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-08 11:57:16 -0400 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-08 11:57:16 -0400 |
commit | 0ddc9f62e59b2b97625f50eb444093bb36950113 (patch) | |
tree | bdba7bdfa514c60404e900724bbe3f52b340fcd9 /Source/cmExternalMakefileProjectGenerator.h | |
parent | 79077f83731e598298ec35392911848f87d32f23 (diff) | |
download | cmake-0ddc9f62e59b2b97625f50eb444093bb36950113.tar.gz |
ENH: add cmExternalMakefileProjectGenerator, which should make it easier to
write generators for IDE projects, which use already existing makefiles
(current the kdevelop generator)
-first stept of the export interface, iniitial export() command
-more replacements for the FIND_XXX docs
Alex
Diffstat (limited to 'Source/cmExternalMakefileProjectGenerator.h')
-rw-r--r-- | Source/cmExternalMakefileProjectGenerator.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h new file mode 100644 index 0000000000..48db2896f4 --- /dev/null +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -0,0 +1,73 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExternalMakefileProjectGenerator_h +#define cmExternalMakefileProjectGenerator_h + +#include <vector> +#include <string> + +#include "cmDocumentation.h" + +class cmGlobalGenerator; + +/** \class cmExternalMakefileProjectGenerator + * \brief Base class for generators for "External Makefile based IDE projects". + * + * cmExternalMakefileProjectGenerator is a base class for generators + * for "external makefile based projects", i.e. IDE projects which work + * an already existing makefiles. + * See cmGlobalKdevelopGenerator as an example. + * After the makefiles have been generated by one of the Makefile + * generators, the Generate() method is called and this generator + * can iterate over the local generators and/or projects to produce the + * project files for the IDE. + */ +class cmExternalMakefileProjectGenerator +{ +public: + ///! Get the name for this generator. + virtual const char* GetName() const = 0; + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry, + const char* fullName) const = 0; + + ///! set the global generator which will generate the makefiles + virtual void SetGlobalGenerator(cmGlobalGenerator* generator) + {this->GlobalGenerator = generator;} + + ///! Return the list of global generators supported by this extra generator + const std::vector<std::string>& GetSupportedGlobalGenerators() const + {return this->SupportedGlobalGenerators;} + + ///! Get the name of the global generator for the given full name + const char* GetGlobalGeneratorName(const char* fullName); + /** Create a full name from the given global generator name and the + * extra generator name + */ + static std::string CreateFullGeneratorName(const char* globalGenerator, + const char* extraGenerator); + + ///! Generate the project files, the Makefiles have already been generated + virtual void Generate() = 0; +protected: + ///! Contains the names of the global generators support by this generator. + std::vector<std::string> SupportedGlobalGenerators; + ///! the global generator which creates the makefiles + const cmGlobalGenerator* GlobalGenerator; +}; + +#endif |