1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
10 #include "cmExternalMakefileProjectGenerator.h"
12 class cmGeneratorTarget;
13 class cmLocalGenerator;
17 /** \class cmExtraCodeBlocksGenerator
18 * \brief Write CodeBlocks project files for Makefile based projects
20 class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
23 cmExtraCodeBlocksGenerator();
25 static cmExternalMakefileProjectGeneratorFactory* GetFactory();
27 void Generate() override;
32 std::vector<const cmGeneratorTarget*> Targets;
35 void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
37 void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
38 const std::string& filename);
39 std::string CreateDummyTargetFile(cmLocalGenerator* lg,
40 cmGeneratorTarget* target) const;
42 std::string GetCBCompilerId(const cmMakefile* mf);
43 int GetCBTargetType(cmGeneratorTarget* target);
44 std::string BuildMakeCommand(const std::string& make,
45 const std::string& makefile,
46 const std::string& target,
47 const std::string& makeFlags);
48 void AppendTarget(cmXMLWriter& xml, const std::string& targetName,
49 cmGeneratorTarget* target, const std::string& make,
50 const cmLocalGenerator* lg, const std::string& compiler,
51 const std::string& makeFlags);