cmGlobalVisualStudio14Generator.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <memory>
  6. #include <string>
  7. #include <cm/optional>
  8. #include "cmGlobalVisualStudio12Generator.h"
  9. class cmGlobalGeneratorFactory;
  10. class cmMakefile;
  11. class cmake;
  12. /** \class cmGlobalVisualStudio14Generator */
  13. class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator
  14. {
  15. public:
  16. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
  17. bool MatchesGeneratorName(const std::string& name) const override;
  18. const char* GetAndroidApplicationTypeRevision() const override
  19. {
  20. return "2.0";
  21. }
  22. protected:
  23. cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name,
  24. std::string const& platformInGeneratorName);
  25. bool InitializeWindowsStore(cmMakefile* mf) override;
  26. bool InitializeAndroid(cmMakefile* mf) override;
  27. bool SelectWindowsStoreToolset(std::string& toolset) const override;
  28. // These aren't virtual because we need to check if the selected version
  29. // of the toolset is installed
  30. bool IsWindowsStoreToolsetInstalled() const;
  31. virtual bool IsWin81SDKInstalled() const;
  32. bool InitializePlatformWindows(cmMakefile* mf) override;
  33. bool VerifyNoGeneratorPlatformVersion(cmMakefile* mf) const override;
  34. bool ProcessGeneratorPlatformField(std::string const& key,
  35. std::string const& value) override;
  36. // Used to adjust the max-SDK-version calculation to accommodate user
  37. // configuration.
  38. std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
  39. // Used to make sure that the Windows 10 SDK selected can work with the
  40. // version of the toolset.
  41. virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
  42. virtual bool SelectWindows10SDK(cmMakefile* mf);
  43. void SetWindowsTargetPlatformVersion(std::string const& version,
  44. cmMakefile* mf);
  45. // Used to verify that the Desktop toolset for the current generator is
  46. // installed on the machine.
  47. bool IsWindowsDesktopToolsetInstalled() const override;
  48. std::string GetWindows10SDKVersion(cmMakefile* mf);
  49. private:
  50. class Factory;
  51. friend class Factory;
  52. cm::optional<std::string> GeneratorPlatformVersion;
  53. };