1ccd4c73b1ce6de390d1a381fdc79ee59d677233
[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 make sure that the Windows 10 SDK selected can work with the
44   // version of the toolset.
45   virtual std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
46
47   virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
48
49   void SetWindowsTargetPlatformVersion(std::string const& version,
50                                        cmMakefile* mf);
51
52   // Used to verify that the Desktop toolset for the current generator is
53   // installed on the machine.
54   bool IsWindowsDesktopToolsetInstalled() const override;
55
56   std::string GetWindows10SDKVersion(cmMakefile* mf);
57
58 private:
59   class Factory;
60   friend class Factory;
61 };