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