2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2007-06-08 19:57:16 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2007-06-08 19:57:16 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2007-06-08 19:57:16 +04:00
|
|
|
#ifndef cmExternalMakefileProjectGenerator_h
|
|
|
|
#define cmExternalMakefileProjectGenerator_h
|
|
|
|
|
2007-06-13 20:52:29 +04:00
|
|
|
#include "cmStandardIncludes.h"
|
2007-06-08 19:57:16 +04:00
|
|
|
|
|
|
|
#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
|
2012-08-13 21:42:58 +04:00
|
|
|
* for "external makefile based projects", i.e. IDE projects which work
|
2007-06-08 19:57:16 +04:00
|
|
|
* an already existing makefiles.
|
|
|
|
* See cmGlobalKdevelopGenerator as an example.
|
2012-08-13 21:42:58 +04:00
|
|
|
* After the makefiles have been generated by one of the Makefile
|
2007-06-08 19:57:16 +04:00
|
|
|
* generators, the Generate() method is called and this generator
|
2012-08-13 21:42:58 +04:00
|
|
|
* can iterate over the local generators and/or projects to produce the
|
2007-06-08 19:57:16 +04:00
|
|
|
* project files for the IDE.
|
|
|
|
*/
|
|
|
|
class cmExternalMakefileProjectGenerator
|
|
|
|
{
|
|
|
|
public:
|
2007-06-08 20:42:29 +04:00
|
|
|
|
|
|
|
virtual ~cmExternalMakefileProjectGenerator() {}
|
|
|
|
|
2007-06-08 19:57:16 +04:00
|
|
|
///! Get the name for this generator.
|
2014-02-25 02:36:27 +04:00
|
|
|
virtual std::string GetName() const = 0;
|
2007-06-08 19:57:16 +04:00
|
|
|
/** Get the documentation entry for this generator. */
|
2012-08-13 21:42:58 +04:00
|
|
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
2014-02-25 02:36:27 +04:00
|
|
|
const std::string& fullName) const = 0;
|
2013-08-29 22:43:54 +04:00
|
|
|
virtual void EnableLanguage(std::vector<std::string> const& languages,
|
|
|
|
cmMakefile *, bool optional);
|
2007-06-08 19:57:16 +04:00
|
|
|
|
|
|
|
///! 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
|
2012-08-13 21:42:58 +04:00
|
|
|
const std::vector<std::string>& GetSupportedGlobalGenerators() const
|
2007-06-08 19:57:16 +04:00
|
|
|
{return this->SupportedGlobalGenerators;}
|
|
|
|
|
|
|
|
///! Get the name of the global generator for the given full name
|
2014-02-25 02:36:27 +04:00
|
|
|
std::string GetGlobalGeneratorName(const std::string& fullName);
|
2007-06-08 19:57:16 +04:00
|
|
|
/** Create a full name from the given global generator name and the
|
|
|
|
* extra generator name
|
|
|
|
*/
|
2014-02-25 02:36:27 +04:00
|
|
|
static std::string CreateFullGeneratorName(
|
|
|
|
const std::string& globalGenerator,
|
|
|
|
const std::string& extraGenerator);
|
2007-06-08 19:57:16 +04:00
|
|
|
|
|
|
|
///! 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
|