summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioVersionedGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-09 15:26:49 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-11 15:37:39 (GMT)
commit68d316e0cf278021d9fa4553471d29803d09a394 (patch)
treecce6ec6105cfea6c06882de6822af3d2a0f93f79 /Source/cmGlobalVisualStudioVersionedGenerator.h
parentd8ed309d0529d9a7b28da561c3640290a8041b68 (diff)
downloadCMake-68d316e0cf278021d9fa4553471d29803d09a394.zip
CMake-68d316e0cf278021d9fa4553471d29803d09a394.tar.gz
CMake-68d316e0cf278021d9fa4553471d29803d09a394.tar.bz2
VS: Rename VS 2017 generator sources to be version-independent
Rename `cmGlobalVisualStudio{15 => Versioned}Generator`. Rename `Factory` to `Factory15` since that part still needs to be version-specific.
Diffstat (limited to 'Source/cmGlobalVisualStudioVersionedGenerator.h')
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h
new file mode 100644
index 0000000..2ffd568
--- /dev/null
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.h
@@ -0,0 +1,62 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#ifndef cmGlobalVisualStudioVersionedGenerator_h
+#define cmGlobalVisualStudioVersionedGenerator_h
+
+#include "cmConfigure.h" // IWYU pragma: keep
+
+#include <iosfwd>
+#include <string>
+
+#include "cmGlobalVisualStudio14Generator.h"
+#include "cmVSSetupHelper.h"
+
+class cmGlobalGeneratorFactory;
+class cmake;
+
+/** \class cmGlobalVisualStudioVersionedGenerator */
+class cmGlobalVisualStudioVersionedGenerator
+ : public cmGlobalVisualStudio14Generator
+{
+public:
+ static cmGlobalGeneratorFactory* NewFactory15();
+
+ bool MatchesGeneratorName(const std::string& name) const override;
+
+ bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
+
+ bool GetVSInstance(std::string& dir) const;
+
+ bool IsDefaultToolset(const std::string& version) const override;
+ std::string GetAuxiliaryToolset() const override;
+
+protected:
+ cmGlobalVisualStudioVersionedGenerator(
+ cmake* cm, const std::string& name,
+ std::string const& platformInGeneratorName);
+
+ bool InitializeWindows(cmMakefile* mf) override;
+ bool SelectWindowsStoreToolset(std::string& toolset) const override;
+
+ // Used to verify that the Desktop toolset for the current generator is
+ // installed on the machine.
+ bool IsWindowsDesktopToolsetInstalled() const override;
+
+ // These aren't virtual because we need to check if the selected version
+ // of the toolset is installed
+ bool IsWindowsStoreToolsetInstalled() const;
+
+ // Check for a Win 8 SDK known to the registry or VS installer tool.
+ bool IsWin81SDKInstalled() const;
+
+ std::string GetWindows10SDKMaxVersion() const override;
+
+ std::string FindMSBuildCommand() override;
+ std::string FindDevEnvCommand() override;
+
+private:
+ class Factory15;
+ friend class Factory15;
+ mutable cmVSSetupAPIHelper vsSetupAPIHelper;
+};
+#endif