1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2004-2009 Kitware, Inc.
4 Copyright 2004 Alexander Neundorf (neundorf@kde.org)
6 Distributed under the OSI-approved BSD License (the "License");
7 see accompanying file Copyright.txt for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even the
10 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 See the License for more information.
12 ============================================================================*/
13 #ifndef cmExtraCodeBlocksGenerator_h
14 #define cmExtraCodeBlocksGenerator_h
16 #include "cmExternalMakefileProjectGenerator.h"
18 class cmLocalGenerator;
21 class cmGeneratedFileStream;
23 /** \class cmExtraCodeBlocksGenerator
24 * \brief Write CodeBlocks project files for Makefile based projects
26 class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
29 cmExtraCodeBlocksGenerator();
31 virtual const char* GetName() const
32 { return cmExtraCodeBlocksGenerator::GetActualName();}
33 static const char* GetActualName() { return "CodeBlocks";}
34 static cmExternalMakefileProjectGenerator* New()
35 { return new cmExtraCodeBlocksGenerator; }
36 /** Get the documentation entry for this generator. */
37 virtual void GetDocumentation(cmDocumentationEntry& entry,
38 const char* fullName) const;
40 virtual void Generate();
43 void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
45 void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
46 const std::string& filename);
47 std::string CreateDummyTargetFile(cmMakefile* mf, cmTarget* target) const;
49 std::string GetCBCompilerId(const cmMakefile* mf);
50 int GetCBTargetType(cmTarget* target);
51 std::string BuildMakeCommand(const std::string& make, const char* makefile,
53 void AppendTarget(cmGeneratedFileStream& fout,
54 const char* targetName,
57 const cmMakefile* makefile,
58 const char* compiler);