1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmExtraCodeBlocksGenerator.h,v $
6 Date: $Date: 2007-11-25 12:45:18 $
7 Version: $Revision: 1.5 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
11 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #ifndef cmExtraCodeBlocksGenerator_h
19 #define cmExtraCodeBlocksGenerator_h
21 #include "cmExternalMakefileProjectGenerator.h"
23 class cmLocalGenerator
;
26 class cmGeneratedFileStream
;
28 /** \class cmExtraCodeBlocksGenerator
29 * \brief Write CodeBlocks project files for Makefile based projects
31 * This generator is in early alpha stage.
33 class cmExtraCodeBlocksGenerator
: public cmExternalMakefileProjectGenerator
36 cmExtraCodeBlocksGenerator();
37 virtual void SetGlobalGenerator(cmGlobalGenerator
* generator
);
39 virtual const char* GetName() const
40 { return cmExtraCodeBlocksGenerator::GetActualName();}
41 static const char* GetActualName() { return "CodeBlocks";}
42 static cmExternalMakefileProjectGenerator
* New()
43 { return new cmExtraCodeBlocksGenerator
; }
44 /** Get the documentation entry for this generator. */
45 virtual void GetDocumentation(cmDocumentationEntry
& entry
,
46 const char* fullName
) const;
48 virtual void Generate();
51 void CreateProjectFile(const std::vector
<cmLocalGenerator
*>& lgs
);
53 void CreateNewProjectFile(const std::vector
<cmLocalGenerator
*>& lgs
,
54 const std::string
& filename
);
55 std::string
GetCBCompilerId(const cmMakefile
* mf
);
56 int GetCBTargetType(cmTarget
* target
);
57 std::string
BuildMakeCommand(const std::string
& make
, const char* makefile
,
59 void AppendTarget(cmGeneratedFileStream
& fout
,
60 const char* targetName
,
63 const cmMakefile
* makefile
,
64 const char* compiler
);