cmake/Source/cmGlobalVisualStudio15Generator.h

60 lines
1.8 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmGlobalVisualStudio15Generator_h
#define cmGlobalVisualStudio15Generator_h
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include <iosfwd>
#include <string>
2016-10-30 18:24:19 +01:00
#include "cmGlobalVisualStudio14Generator.h"
2017-04-14 19:02:05 +02:00
#include "cmVSSetupHelper.h"
class cmGlobalGeneratorFactory;
class cmake;
2016-10-30 18:24:19 +01:00
/** \class cmGlobalVisualStudio15Generator */
class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator
{
public:
cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name,
const std::string& platformName);
static cmGlobalGeneratorFactory* NewFactory();
2018-04-23 21:13:27 +02:00
bool MatchesGeneratorName(const std::string& name) const override;
2016-10-30 18:24:19 +01:00
2018-04-23 21:13:27 +02:00
void WriteSLNHeader(std::ostream& fout) override;
const char* GetToolsVersion() override { return "15.0"; }
bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
bool GetVSInstance(std::string& dir) const;
2016-10-30 18:24:19 +01:00
protected:
2018-01-26 17:06:56 +01:00
bool InitializeWindows(cmMakefile* mf) override;
2018-04-23 21:13:27 +02:00
bool SelectWindowsStoreToolset(std::string& toolset) const override;
2016-10-30 18:24:19 +01:00
2018-04-23 21:13:27 +02:00
const char* GetIDEVersion() override { return "15.0"; }
2016-10-30 18:24:19 +01:00
// Used to verify that the Desktop toolset for the current generator is
// installed on the machine.
2018-04-23 21:13:27 +02:00
bool IsWindowsDesktopToolsetInstalled() const override;
2016-10-30 18:24:19 +01:00
// These aren't virtual because we need to check if the selected version
// of the toolset is installed
bool IsWindowsStoreToolsetInstalled() const;
2017-04-14 19:02:05 +02:00
// Check for a Win 8 SDK known to the registry or VS installer tool.
bool IsWin81SDKInstalled() const;
2018-01-26 17:06:56 +01:00
std::string FindMSBuildCommand() override;
std::string FindDevEnvCommand() override;
2017-04-14 19:02:05 +02:00
2016-10-30 18:24:19 +01:00
private:
class Factory;
2017-04-14 19:02:05 +02:00
mutable cmVSSetupAPIHelper vsSetupAPIHelper;
2016-10-30 18:24:19 +01:00
};
#endif