summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-03 18:53:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-19 14:20:08 (GMT)
commit314613d1afd069dd896aa0d5112dfbf2b82af3c3 (patch)
treed6de6878803459df63b60c86e42c5a1faa6c8fc2 /Source/cmake.h
parent358ceee5d84723f60c2db5cdff52445d478d6a42 (diff)
downloadCMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.zip
CMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.tar.gz
CMake-314613d1afd069dd896aa0d5112dfbf2b82af3c3.tar.bz2
Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location persistently across re-runs of CMake in a given build tree. For now we reject the option by default if explicitly set. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add a RunCMake.GeneratorInstance test to cover basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE` is empty by default, and that it is rejected when the generator does not support a user setting. Issue: #17268
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index ed3ebe0..5c5a90d 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -203,6 +203,12 @@ public:
///! Get the names of the current registered generators
void GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) const;
+ ///! Set the name of the selected generator-specific instance.
+ void SetGeneratorInstance(std::string const& instance)
+ {
+ this->GeneratorInstance = instance;
+ }
+
///! Set the name of the selected generator-specific platform.
void SetGeneratorPlatform(std::string const& ts)
{
@@ -431,6 +437,7 @@ protected:
cmGlobalGenerator* GlobalGenerator;
std::map<std::string, DiagLevel> DiagLevels;
+ std::string GeneratorInstance;
std::string GeneratorPlatform;
std::string GeneratorToolset;