1
0

cmGlobalVisualStudio14Generator.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. bool InitializeWindowsStore(cmMakefile* mf) override;
  25. bool InitializeAndroid(cmMakefile* mf) override;
  26. bool SelectWindowsStoreToolset(std::string& toolset) const override;
  27. // These aren't virtual because we need to check if the selected version
  28. // of the toolset is installed
  29. bool IsWindowsStoreToolsetInstalled() const;
  30. virtual bool IsWin81SDKInstalled() const;
  31. bool InitializePlatformWindows(cmMakefile* mf) override;
  32. bool VerifyNoGeneratorPlatformVersion(cmMakefile* mf) const override;
  33. bool ProcessGeneratorPlatformField(std::string const& key,
  34. std::string const& value) override;
  35. // Used to adjust the max-SDK-version calculation to accommodate user
  36. // configuration.
  37. std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
  38. // Used to make sure that the Windows 10 SDK selected can work with the
  39. // version of the toolset.
  40. virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
  41. virtual bool SelectWindows10SDK(cmMakefile* mf);
  42. void SetWindowsTargetPlatformVersion(std::string const& version,
  43. cmMakefile* mf);
  44. // Used to verify that the Desktop toolset for the current generator is
  45. // installed on the machine.
  46. bool IsWindowsDesktopToolsetInstalled() const override;
  47. std::string GetWindows10SDKVersion(cmMakefile* mf);
  48. void AddSolutionItems(cmLocalGenerator* root) override;
  49. void WriteFolderSolutionItems(std::ostream& fout,
  50. const cmVisualStudioFolder& folder) override;
  51. private:
  52. class Factory;
  53. friend class Factory;
  54. cm::optional<std::string> GeneratorPlatformVersion;
  55. };