2009-09-28 11:43:28 -04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2004-2009 Kitware, Inc.
|
|
|
|
Copyright 2004 Alexander Neundorf (neundorf@kde.org)
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2007-07-13 00:58:43 -04:00
|
|
|
#ifndef cmExtraCodeBlocksGenerator_h
|
|
|
|
#define cmExtraCodeBlocksGenerator_h
|
|
|
|
|
|
|
|
#include "cmExternalMakefileProjectGenerator.h"
|
|
|
|
|
|
|
|
class cmLocalGenerator;
|
|
|
|
class cmMakefile;
|
2015-10-09 22:27:46 +02:00
|
|
|
class cmGeneratorTarget;
|
2015-07-16 21:52:35 +02:00
|
|
|
class cmXMLWriter;
|
2007-07-13 00:58:43 -04:00
|
|
|
|
|
|
|
/** \class cmExtraCodeBlocksGenerator
|
|
|
|
* \brief Write CodeBlocks project files for Makefile based projects
|
|
|
|
*/
|
|
|
|
class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmExtraCodeBlocksGenerator();
|
|
|
|
|
2014-02-24 17:36:27 -05:00
|
|
|
virtual std::string GetName() const
|
2016-05-16 10:34:04 -04:00
|
|
|
{
|
|
|
|
return cmExtraCodeBlocksGenerator::GetActualName();
|
|
|
|
}
|
|
|
|
static std::string GetActualName() { return "CodeBlocks"; }
|
2010-11-11 22:02:07 +01:00
|
|
|
static cmExternalMakefileProjectGenerator* New()
|
2016-05-16 10:34:04 -04:00
|
|
|
{
|
|
|
|
return new cmExtraCodeBlocksGenerator;
|
|
|
|
}
|
2007-07-13 00:58:43 -04:00
|
|
|
/** Get the documentation entry for this generator. */
|
2010-11-11 22:02:07 +01:00
|
|
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
2014-02-24 17:36:27 -05:00
|
|
|
const std::string& fullName) const;
|
2007-07-13 00:58:43 -04:00
|
|
|
|
|
|
|
virtual void Generate();
|
2016-05-16 10:34:04 -04:00
|
|
|
|
2007-07-13 00:58:43 -04:00
|
|
|
private:
|
2015-03-06 09:48:33 +01:00
|
|
|
struct CbpUnit
|
|
|
|
{
|
2015-10-21 21:38:24 +02:00
|
|
|
std::vector<const cmGeneratorTarget*> Targets;
|
2015-03-06 09:48:33 +01:00
|
|
|
};
|
2007-07-13 00:58:43 -04:00
|
|
|
|
|
|
|
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
|
|
|
|
|
|
|
|
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
|
2016-05-16 10:34:04 -04:00
|
|
|
const std::string& filename);
|
2015-06-06 13:00:51 +02:00
|
|
|
std::string CreateDummyTargetFile(cmLocalGenerator* lg,
|
2015-10-09 22:27:46 +02:00
|
|
|
cmGeneratorTarget* target) const;
|
2012-04-09 14:53:47 +02:00
|
|
|
|
2007-08-29 10:12:09 -04:00
|
|
|
std::string GetCBCompilerId(const cmMakefile* mf);
|
2015-10-21 21:38:24 +02:00
|
|
|
int GetCBTargetType(cmGeneratorTarget* target);
|
2010-11-11 22:02:07 +01:00
|
|
|
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
2016-02-23 22:37:44 +01:00
|
|
|
const std::string& target,
|
|
|
|
const std::string& makeFlags);
|
2016-05-16 10:34:04 -04: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 00:58:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|