diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-07-11 13:44:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-14 14:35:58 (GMT) |
commit | 4db08807db2fc0db6ab0c4d438ddb3f20969d2fb (patch) | |
tree | 1ad4e9fa5d75b702f8e5ec236cca720978d64053 /Source | |
parent | 43a68a6dcaa7a98d94a71b4f2ecc2e2c63c84688 (diff) | |
download | CMake-4db08807db2fc0db6ab0c4d438ddb3f20969d2fb.zip CMake-4db08807db2fc0db6ab0c4d438ddb3f20969d2fb.tar.gz CMake-4db08807db2fc0db6ab0c4d438ddb3f20969d2fb.tar.bz2 |
CMake: Report whether generators support platforms
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGeneratorFactory.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio12Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio14Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 | ||||
-rw-r--r-- | Source/cmake.h | 1 |
14 files changed, 40 insertions, 0 deletions
diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 6787519..74d3145 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -41,6 +41,9 @@ public: /** Determine whether or not this generator supports toolsets */ virtual bool SupportsToolset() const = 0; + + /** Determine whether or not this generator supports platforms */ + virtual bool SupportsPlatform() const = 0; }; template <class T> @@ -71,6 +74,9 @@ public: /** Determine whether or not this generator supports toolsets */ bool SupportsToolset() const CM_OVERRIDE { return T::SupportsToolset(); } + + /** Determine whether or not this generator supports platforms */ + bool SupportsPlatform() const CM_OVERRIDE { return T::SupportsPlatform(); } }; #endif diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 473d153..b2aac45 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -52,6 +52,12 @@ public: static bool SupportsToolset() { return false; } /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + + /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 69ec6ca..c74973e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -81,6 +81,12 @@ public: static bool SupportsToolset() { return false; } /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + + /** * Write a build statement to @a os with the @a comment using * the @a rule the list of @a outputs files and inputs. * It also writes the variables bound to this build statement. diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 98969ff..ceb4140 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -75,6 +75,12 @@ public: */ static bool SupportsToolset() { return false; } + /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 2379266..c13c622 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -80,6 +80,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 106f1dd..1478a17 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -92,6 +92,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 2b32153..3047171 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -74,6 +74,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 920d995..254682c 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -74,6 +74,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 2092343..8a33ee0 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -48,6 +48,12 @@ public: static bool SupportsToolset() { return false; } /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + + /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 3cade96..2c0168e 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -83,6 +83,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return false; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index b65a5a9..acc7baa 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -86,6 +86,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return false; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory() diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7b085d0..23fad51 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -122,6 +122,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return false; } }; cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm, diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c597605..fceec16 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -853,6 +853,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) for (size_t j = 0; j < names.size(); ++j) { GeneratorInfo info; info.supportsToolset = (*i)->SupportsToolset(); + info.supportsPlatform = (*i)->SupportsPlatform(); info.name = names[j]; generators.push_back(info); } @@ -865,6 +866,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) GeneratorInfo info; info.name = i->first; info.supportsToolset = false; + info.supportsPlatform = false; generators.push_back(info); } } diff --git a/Source/cmake.h b/Source/cmake.h index 4a5376d..4ca2a80 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -104,6 +104,7 @@ public: { std::string name; bool supportsToolset; + bool supportsPlatform; }; typedef std::map<std::string, cmInstalledFile> InstalledFilesMap; |