cmGlobalVisualStudio15Generator.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. #ifndef cmGlobalVisualStudio15Generator_h
  4. #define cmGlobalVisualStudio15Generator_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <iosfwd>
  7. #include <string>
  8. #include "cmGlobalVisualStudio14Generator.h"
  9. #include "cmVSSetupHelper.h"
  10. class cmGlobalGeneratorFactory;
  11. class cmake;
  12. /** \class cmGlobalVisualStudio15Generator */
  13. class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator
  14. {
  15. public:
  16. cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name,
  17. const std::string& platformName);
  18. static cmGlobalGeneratorFactory* NewFactory();
  19. bool MatchesGeneratorName(const std::string& name) const override;
  20. void WriteSLNHeader(std::ostream& fout) override;
  21. const char* GetToolsVersion() override { return "15.0"; }
  22. bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
  23. bool GetVSInstance(std::string& dir) const;
  24. bool IsDefaultToolset(const std::string& version) const override;
  25. std::string GetAuxiliaryToolset() const override;
  26. protected:
  27. bool InitializeWindows(cmMakefile* mf) override;
  28. bool SelectWindowsStoreToolset(std::string& toolset) const override;
  29. const char* GetIDEVersion() override { return "15.0"; }
  30. // Used to verify that the Desktop toolset for the current generator is
  31. // installed on the machine.
  32. bool IsWindowsDesktopToolsetInstalled() const override;
  33. // These aren't virtual because we need to check if the selected version
  34. // of the toolset is installed
  35. bool IsWindowsStoreToolsetInstalled() const;
  36. // Check for a Win 8 SDK known to the registry or VS installer tool.
  37. bool IsWin81SDKInstalled() const;
  38. std::string GetWindows10SDKMaxVersion() const override;
  39. std::string FindMSBuildCommand() override;
  40. std::string FindDevEnvCommand() override;
  41. private:
  42. class Factory;
  43. mutable cmVSSetupAPIHelper vsSetupAPIHelper;
  44. };
  45. #endif