cmGlobalVisualStudio15Generator.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. protected:
  25. bool InitializeWindows(cmMakefile* mf) override;
  26. bool SelectWindowsStoreToolset(std::string& toolset) const override;
  27. const char* GetIDEVersion() override { return "15.0"; }
  28. // Used to verify that the Desktop toolset for the current generator is
  29. // installed on the machine.
  30. bool IsWindowsDesktopToolsetInstalled() const override;
  31. // These aren't virtual because we need to check if the selected version
  32. // of the toolset is installed
  33. bool IsWindowsStoreToolsetInstalled() const;
  34. // Check for a Win 8 SDK known to the registry or VS installer tool.
  35. bool IsWin81SDKInstalled() const;
  36. std::string FindMSBuildCommand() override;
  37. std::string FindDevEnvCommand() override;
  38. private:
  39. class Factory;
  40. mutable cmVSSetupAPIHelper vsSetupAPIHelper;
  41. };
  42. #endif