cmake/Source/cmGlobalVisualStudioVersionedGenerator.h

71 lines
2.2 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. */
2019-11-11 23:01:05 +01:00
#ifndef cmGlobalVisualStudioVersionedGenerator_h
#define cmGlobalVisualStudioVersionedGenerator_h
2016-10-30 18:24:19 +01:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include <iosfwd>
2020-08-30 11:54:41 +02:00
#include <memory>
2017-04-14 19:02:05 +02:00
#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
2019-11-11 23:01:05 +01:00
/** \class cmGlobalVisualStudioVersionedGenerator */
class cmGlobalVisualStudioVersionedGenerator
: public cmGlobalVisualStudio14Generator
2016-10-30 18:24:19 +01:00
{
public:
2020-08-30 11:54:41 +02:00
static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory15();
static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory16();
2016-10-30 18:24:19 +01:00
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
bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override;
bool GetVSInstance(std::string& dir) const;
2016-10-30 18:24:19 +01:00
2020-08-30 11:54:41 +02:00
bool GetVSInstanceVersion(unsigned long long& vsInstanceVersion) const;
2018-08-09 18:06:22 +02:00
bool IsDefaultToolset(const std::string& version) const override;
std::string GetAuxiliaryToolset() const override;
2020-08-30 11:54:41 +02:00
bool IsStdOutEncodingSupported() const override;
2018-08-09 18:06:22 +02:00
2016-10-30 18:24:19 +01:00
protected:
2019-11-11 23:01:05 +01:00
cmGlobalVisualStudioVersionedGenerator(
VSVersion version, cmake* cm, const std::string& name,
std::string const& platformInGeneratorName);
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
// 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-10-28 12:09:07 +01:00
std::string GetWindows10SDKMaxVersion() const override;
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:
2019-11-11 23:01:05 +01:00
class Factory15;
friend class Factory15;
class Factory16;
friend class Factory16;
2017-04-14 19:02:05 +02:00
mutable cmVSSetupAPIHelper vsSetupAPIHelper;
2016-10-30 18:24:19 +01:00
};
#endif