1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
11 #include "cmGlobalVisualStudio14Generator.h"
12 #include "cmVSSetupHelper.h"
14 class cmGlobalGeneratorFactory;
17 /** \class cmGlobalVisualStudioVersionedGenerator */
18 class cmGlobalVisualStudioVersionedGenerator
19 : public cmGlobalVisualStudio14Generator
22 static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory15();
23 static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory16();
25 bool MatchesGeneratorName(const std::string& name) const override;
27 bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
29 bool GetVSInstance(std::string& dir) const;
31 bool GetVSInstanceVersion(unsigned long long& vsInstanceVersion) const;
33 bool IsDefaultToolset(const std::string& version) const override;
34 std::string GetAuxiliaryToolset() const override;
36 bool IsStdOutEncodingSupported() const override;
38 const char* GetAndroidApplicationTypeRevision() const override;
41 cmGlobalVisualStudioVersionedGenerator(
42 VSVersion version, cmake* cm, const std::string& name,
43 std::string const& platformInGeneratorName);
45 bool InitializeWindows(cmMakefile* mf) override;
46 bool SelectWindowsStoreToolset(std::string& toolset) const override;
48 // Used to verify that the Desktop toolset for the current generator is
49 // installed on the machine.
50 bool IsWindowsDesktopToolsetInstalled() const override;
52 // These aren't virtual because we need to check if the selected version
53 // of the toolset is installed
54 bool IsWindowsStoreToolsetInstalled() const;
56 // Check for a Win 8 SDK known to the registry or VS installer tool.
57 bool IsWin81SDKInstalled() const;
59 std::string GetWindows10SDKMaxVersionDefault(cmMakefile*) const override;
61 std::string FindMSBuildCommand() override;
62 std::string FindDevEnvCommand() override;
66 friend class Factory15;
68 friend class Factory16;
69 mutable cmVSSetupAPIHelper vsSetupAPIHelper;