cmake/Source/cmExtraCodeBlocksGenerator.h

53 lines
1.7 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
#include "cmExternalMakefileProjectGenerator.h"
2016-10-30 18:24:19 +01:00
class cmGeneratorTarget;
class cmLocalGenerator;
class cmMakefile;
2016-07-09 11:21:54 +02:00
class cmXMLWriter;
/** \class cmExtraCodeBlocksGenerator
* \brief Write CodeBlocks project files for Makefile based projects
*/
class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
{
public:
cmExtraCodeBlocksGenerator();
2016-10-30 18:24:19 +01:00
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
2018-01-26 17:06:56 +01:00
void Generate() override;
2016-07-09 11:21:54 +02:00
private:
2015-08-17 11:37:30 +02:00
struct CbpUnit
{
2016-03-13 13:35:51 +01:00
std::vector<const cmGeneratorTarget*> Targets;
2015-08-17 11:37:30 +02:00
};
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
2016-07-09 11:21:54 +02:00
const std::string& filename);
2015-11-17 17:22:37 +01:00
std::string CreateDummyTargetFile(cmLocalGenerator* lg,
2016-03-13 13:35:51 +01:00
cmGeneratorTarget* target) const;
2012-06-27 20:52:58 +03:00
std::string GetCBCompilerId(const cmMakefile* mf);
2016-03-13 13:35:51 +01:00
int GetCBTargetType(cmGeneratorTarget* target);
2019-11-11 23:01:05 +01:00
std::string BuildMakeCommand(const std::string& make,
const std::string& makefile,
2016-07-09 11:21:54 +02:00
const std::string& target,
const std::string& makeFlags);
void AppendTarget(cmXMLWriter& xml, const std::string& targetName,
2019-11-11 23:01:05 +01:00
cmGeneratorTarget* target, const std::string& make,
const cmLocalGenerator* lg, const std::string& compiler,
2016-07-09 11:21:54 +02:00
const std::string& makeFlags);
};