summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-07-20 16:28:39 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-03 13:43:00 (GMT)
commita354f60ce07cd67bd60161824a4e74bf9068fea4 (patch)
tree14c272760205567469ddd856a99e98ace6282841 /Source/cmake.h
parentfd59f9ad519c1c311c54569133797d9061e90558 (diff)
downloadCMake-a354f60ce07cd67bd60161824a4e74bf9068fea4.zip
CMake-a354f60ce07cd67bd60161824a4e74bf9068fea4.tar.gz
CMake-a354f60ce07cd67bd60161824a4e74bf9068fea4.tar.bz2
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.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 4ca2a80..0fd2d31 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -27,7 +27,7 @@ class cmLocalGenerator;
class cmMakefile;
class cmVariableWatch;
class cmFileTimeComparison;
-class cmExternalMakefileProjectGenerator;
+class cmExternalMakefileProjectGeneratorFactory;
class cmDocumentationSection;
class cmTarget;
class cmGeneratedFileStream;
@@ -105,6 +105,7 @@ public:
std::string name;
bool supportsToolset;
bool supportsPlatform;
+ bool isAlias;
};
typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
@@ -416,18 +417,14 @@ protected:
void InitializeProperties();
int HandleDeleteCacheVariables(const std::string& var);
- typedef cmExternalMakefileProjectGenerator* (
- *CreateExtraGeneratorFunctionType)();
- typedef std::map<std::string, CreateExtraGeneratorFunctionType>
- RegisteredExtraGeneratorsMap;
typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
RegisteredGeneratorsVector Generators;
- RegisteredExtraGeneratorsMap ExtraGenerators;
+ typedef std::vector<cmExternalMakefileProjectGeneratorFactory*>
+ RegisteredExtraGeneratorsVector;
+ RegisteredExtraGeneratorsVector ExtraGenerators;
void AddDefaultCommands();
void AddDefaultGenerators();
void AddDefaultExtraGenerators();
- void AddExtraGenerator(const std::string& name,
- CreateExtraGeneratorFunctionType newFunction);
cmGlobalGenerator* GlobalGenerator;
std::map<std::string, DiagLevel> DiagLevels;