2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2007-07-13 08:58:43 +04:00
|
|
|
#ifndef cmExtraCodeBlocksGenerator_h
|
|
|
|
#define cmExtraCodeBlocksGenerator_h
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2007-07-13 08:58:43 +04:00
|
|
|
#include "cmExternalMakefileProjectGenerator.h"
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmGeneratorTarget;
|
2007-07-13 08:58:43 +04:00
|
|
|
class cmLocalGenerator;
|
|
|
|
class cmMakefile;
|
2015-07-16 22:52:35 +03:00
|
|
|
class cmXMLWriter;
|
2007-07-13 08:58:43 +04:00
|
|
|
|
|
|
|
/** \class cmExtraCodeBlocksGenerator
|
|
|
|
* \brief Write CodeBlocks project files for Makefile based projects
|
|
|
|
*/
|
|
|
|
class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmExtraCodeBlocksGenerator();
|
|
|
|
|
2016-07-20 19:28:39 +03:00
|
|
|
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
|
2007-07-13 08:58:43 +04:00
|
|
|
|
2016-06-27 22:25:27 +03:00
|
|
|
void Generate() CM_OVERRIDE;
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2007-07-13 08:58:43 +04:00
|
|
|
private:
|
2015-03-06 11:48:33 +03:00
|
|
|
struct CbpUnit
|
|
|
|
{
|
2015-10-21 22:38:24 +03:00
|
|
|
std::vector<const cmGeneratorTarget*> Targets;
|
2015-03-06 11:48:33 +03:00
|
|
|
};
|
2007-07-13 08:58:43 +04:00
|
|
|
|
|
|
|
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
|
|
|
|
|
|
|
|
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
|
2016-05-16 17:34:04 +03:00
|
|
|
const std::string& filename);
|
2015-06-06 14:00:51 +03:00
|
|
|
std::string CreateDummyTargetFile(cmLocalGenerator* lg,
|
2015-10-09 23:27:46 +03:00
|
|
|
cmGeneratorTarget* target) const;
|
2012-04-09 16:53:47 +04:00
|
|
|
|
2007-08-29 18:12:09 +04:00
|
|
|
std::string GetCBCompilerId(const cmMakefile* mf);
|
2015-10-21 22:38:24 +03:00
|
|
|
int GetCBTargetType(cmGeneratorTarget* target);
|
2010-11-12 00:02:07 +03:00
|
|
|
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
2016-02-24 00:37:44 +03:00
|
|
|
const std::string& target,
|
|
|
|
const std::string& makeFlags);
|
2016-05-16 17:34:04 +03:00
|
|
|
void AppendTarget(cmXMLWriter& xml, const std::string& targetName,
|
|
|
|
cmGeneratorTarget* target, const char* make,
|
|
|
|
const cmLocalGenerator* lg, const char* compiler,
|
|
|
|
const std::string& makeFlags);
|
2007-07-13 08:58:43 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|