cmExtraCodeBlocksGenerator.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. Copyright (c) 2004 Alexander Neundorf, [email protected]. All rights reserved.
  9. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  10. This software is distributed WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE. See the above copyright notices for more information.
  13. =========================================================================*/
  14. #ifndef cmExtraCodeBlocksGenerator_h
  15. #define cmExtraCodeBlocksGenerator_h
  16. #include "cmExternalMakefileProjectGenerator.h"
  17. class cmLocalGenerator;
  18. class cmMakefile;
  19. class cmTarget;
  20. /** \class cmExtraCodeBlocksGenerator
  21. * \brief Write CodeBlocks project files for Makefile based projects
  22. *
  23. * This generator is in early alpha stage.
  24. */
  25. class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
  26. {
  27. public:
  28. cmExtraCodeBlocksGenerator();
  29. virtual void SetGlobalGenerator(cmGlobalGenerator* generator);
  30. virtual const char* GetName() const
  31. { return cmExtraCodeBlocksGenerator::GetActualName();}
  32. static const char* GetActualName() { return "CodeBlocks";}
  33. static cmExternalMakefileProjectGenerator* New()
  34. { return new cmExtraCodeBlocksGenerator; }
  35. /** Get the documentation entry for this generator. */
  36. virtual void GetDocumentation(cmDocumentationEntry& entry,
  37. const char* fullName) const;
  38. virtual void Generate();
  39. private:
  40. void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
  41. void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
  42. const std::string& filename);
  43. std::string GetCBCompilerId(const cmMakefile* mf);
  44. int GetCBTargetType(cmTarget* target);
  45. std::string BuildMakeCommand(const std::string& make, const char* makefile,
  46. const char* target);
  47. };
  48. #endif