cmExternalMakefileProjectGenerator.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmExternalMakefileProjectGenerator_h
  11. #define cmExternalMakefileProjectGenerator_h
  12. #include "cmStandardIncludes.h"
  13. #include "cmDocumentation.h"
  14. class cmGlobalGenerator;
  15. /** \class cmExternalMakefileProjectGenerator
  16. * \brief Base class for generators for "External Makefile based IDE projects".
  17. *
  18. * cmExternalMakefileProjectGenerator is a base class for generators
  19. * for "external makefile based projects", i.e. IDE projects which work
  20. * an already existing makefiles.
  21. * See cmGlobalKdevelopGenerator as an example.
  22. * After the makefiles have been generated by one of the Makefile
  23. * generators, the Generate() method is called and this generator
  24. * can iterate over the local generators and/or projects to produce the
  25. * project files for the IDE.
  26. */
  27. class cmExternalMakefileProjectGenerator
  28. {
  29. public:
  30. virtual ~cmExternalMakefileProjectGenerator() {}
  31. ///! Get the name for this generator.
  32. virtual const char* GetName() const = 0;
  33. /** Get the documentation entry for this generator. */
  34. virtual void GetDocumentation(cmDocumentationEntry& entry,
  35. const char* fullName) const = 0;
  36. ///! set the global generator which will generate the makefiles
  37. virtual void SetGlobalGenerator(cmGlobalGenerator* generator)
  38. {this->GlobalGenerator = generator;}
  39. ///! Return the list of global generators supported by this extra generator
  40. const std::vector<std::string>& GetSupportedGlobalGenerators() const
  41. {return this->SupportedGlobalGenerators;}
  42. ///! Get the name of the global generator for the given full name
  43. const char* GetGlobalGeneratorName(const char* fullName);
  44. /** Create a full name from the given global generator name and the
  45. * extra generator name
  46. */
  47. static std::string CreateFullGeneratorName(const char* globalGenerator,
  48. const char* extraGenerator);
  49. ///! Generate the project files, the Makefiles have already been generated
  50. virtual void Generate() = 0;
  51. protected:
  52. ///! Contains the names of the global generators support by this generator.
  53. std::vector<std::string> SupportedGlobalGenerators;
  54. ///! the global generator which creates the makefiles
  55. const cmGlobalGenerator* GlobalGenerator;
  56. };
  57. #endif