Imported Upstream version 3.19.4
[platform/upstream/cmake.git] / Source / cmGlobalVisualStudio14Generator.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <iosfwd>
8 #include <memory>
9 #include <string>
10
11 #include "cmGlobalVisualStudio12Generator.h"
12
13 class cmGlobalGeneratorFactory;
14 class cmMakefile;
15 class cmake;
16
17 /** \class cmGlobalVisualStudio14Generator  */
18 class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator
19 {
20 public:
21   static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
22
23   bool MatchesGeneratorName(const std::string& name) const override;
24
25   const char* GetAndroidApplicationTypeRevision() const override
26   {
27     return "2.0";
28   }
29
30 protected:
31   cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name,
32                                   std::string const& platformInGeneratorName);
33
34   bool InitializeWindows(cmMakefile* mf) override;
35   bool InitializeWindowsStore(cmMakefile* mf) override;
36   bool InitializeAndroid(cmMakefile* mf) override;
37   bool SelectWindowsStoreToolset(std::string& toolset) const override;
38
39   // These aren't virtual because we need to check if the selected version
40   // of the toolset is installed
41   bool IsWindowsStoreToolsetInstalled() const;
42
43   // Used to adjust the max-SDK-version calculation to accommodate user
44   // configuration.
45   std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
46
47   // Used to make sure that the Windows 10 SDK selected can work with the
48   // version of the toolset.
49   virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
50
51   virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
52
53   void SetWindowsTargetPlatformVersion(std::string const& version,
54                                        cmMakefile* mf);
55
56   // Used to verify that the Desktop toolset for the current generator is
57   // installed on the machine.
58   bool IsWindowsDesktopToolsetInstalled() const override;
59
60   std::string GetWindows10SDKVersion(cmMakefile* mf);
61
62 private:
63   class Factory;
64   friend class Factory;
65 };