mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
Refactor extra generator registration to use factories
This will allow additional information about the availability and capabilities of extra generators to be queried without actually creating them. Instead of a static NewFactory() method like the main generator factories have, use a static GetFactory() method to get a pointer to a statically allocated extra generator factory. This simplifies memory management.
This commit is contained in:
@@ -28,18 +28,7 @@ class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator
|
||||
public:
|
||||
cmExtraCodeBlocksGenerator();
|
||||
|
||||
std::string GetName() const CM_OVERRIDE
|
||||
{
|
||||
return cmExtraCodeBlocksGenerator::GetActualName();
|
||||
}
|
||||
static std::string GetActualName() { return "CodeBlocks"; }
|
||||
static cmExternalMakefileProjectGenerator* New()
|
||||
{
|
||||
return new cmExtraCodeBlocksGenerator;
|
||||
}
|
||||
/** Get the documentation entry for this generator. */
|
||||
void GetDocumentation(cmDocumentationEntry& entry,
|
||||
const std::string& fullName) const CM_OVERRIDE;
|
||||
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
|
||||
|
||||
void Generate() CM_OVERRIDE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user