cmGlobalVisualStudio14Generator.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 "cmGlobalVisualStudio12Generator.h"
  8. class cmGlobalGeneratorFactory;
  9. class cmMakefile;
  10. class cmake;
  11. /** \class cmGlobalVisualStudio14Generator */
  12. class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator
  13. {
  14. public:
  15. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
  16. bool MatchesGeneratorName(const std::string& name) const override;
  17. const char* GetAndroidApplicationTypeRevision() const override
  18. {
  19. return "2.0";
  20. }
  21. protected:
  22. cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name,
  23. std::string const& platformInGeneratorName);
  24. bool InitializeWindows(cmMakefile* mf) override;
  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. // Used to adjust the max-SDK-version calculation to accommodate user
  32. // configuration.
  33. std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
  34. // Used to make sure that the Windows 10 SDK selected can work with the
  35. // version of the toolset.
  36. virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
  37. virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
  38. void SetWindowsTargetPlatformVersion(std::string const& version,
  39. cmMakefile* mf);
  40. // Used to verify that the Desktop toolset for the current generator is
  41. // installed on the machine.
  42. bool IsWindowsDesktopToolsetInstalled() const override;
  43. std::string GetWindows10SDKVersion(cmMakefile* mf);
  44. private:
  45. class Factory;
  46. friend class Factory;
  47. };