cmGlobalVisualStudio14Generator.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 <iosfwd>
  6. #include <memory>
  7. #include <string>
  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 InitializeWindows(cmMakefile* mf) override;
  26. bool InitializeWindowsStore(cmMakefile* mf) override;
  27. bool InitializeAndroid(cmMakefile* mf) override;
  28. bool SelectWindowsStoreToolset(std::string& toolset) const override;
  29. // These aren't virtual because we need to check if the selected version
  30. // of the toolset is installed
  31. bool IsWindowsStoreToolsetInstalled() const;
  32. // Used to adjust the max-SDK-version calculation to accommodate user
  33. // configuration.
  34. std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
  35. // Used to make sure that the Windows 10 SDK selected can work with the
  36. // version of the toolset.
  37. virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
  38. virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
  39. void SetWindowsTargetPlatformVersion(std::string const& version,
  40. cmMakefile* mf);
  41. // Used to verify that the Desktop toolset for the current generator is
  42. // installed on the machine.
  43. bool IsWindowsDesktopToolsetInstalled() const override;
  44. std::string GetWindows10SDKVersion(cmMakefile* mf);
  45. private:
  46. class Factory;
  47. friend class Factory;
  48. };