diff options
author | Brad King <brad.king@kitware.com> | 2019-05-22 14:30:43 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-22 10:32:43 -0400 |
commit | 8ed6efbbd377c0941ba018200282fc961aa7d20e (patch) | |
tree | cf5f8c2f55359033068eb3206b8f1887c4b43bdd /Source/cmake.h | |
parent | fc4cbbc2a5f9f7d38e77c991a88400b29c39f182 (diff) | |
parent | d0f0ba0f7a39e70fbed197e717292b74150cf84f (diff) | |
download | cmake-8ed6efbbd377c0941ba018200282fc961aa7d20e.tar.gz |
Merge topic 'default-generator-env'
d0f0ba0f7a Tests: Add environment generator tests
a48ce8f4bf Help: Add documentation for default generator environment variables
083cf7e8a2 cmake: Allow default generator to be set by environment variables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3218
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index 34d9bcda64..4de9d28ea9 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -214,18 +214,21 @@ public: void SetGeneratorInstance(std::string const& instance) { this->GeneratorInstance = instance; + this->GeneratorInstanceSet = true; } //! Set the name of the selected generator-specific platform. void SetGeneratorPlatform(std::string const& ts) { this->GeneratorPlatform = ts; + this->GeneratorPlatformSet = true; } //! Set the name of the selected generator-specific toolset. void SetGeneratorToolset(std::string const& ts) { this->GeneratorToolset = ts; + this->GeneratorToolsetSet = true; } const std::vector<std::string>& GetSourceExtensions() const @@ -276,6 +279,9 @@ public: */ int GetSystemInformation(std::vector<std::string>&); + //! Parse environment variables + void LoadEnvironmentPresets(); + //! Parse command line arguments void SetArgs(const std::vector<std::string>& args); @@ -479,6 +485,9 @@ protected: std::string GeneratorInstance; std::string GeneratorPlatform; std::string GeneratorToolset; + bool GeneratorInstanceSet; + bool GeneratorPlatformSet; + bool GeneratorToolsetSet; //! read in a cmake list file to initialize the cache void ReadListFile(const std::vector<std::string>& args, @@ -521,6 +530,7 @@ private: std::string CheckStampFile; std::string CheckStampList; std::string VSSolutionFile; + std::string EnvironmentGenerator; std::vector<std::string> SourceFileExtensions; std::unordered_set<std::string> SourceFileExtensionsSet; std::vector<std::string> HeaderFileExtensions; |