mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-19 19:36:41 +08:00

Since commit 83ddc4d289 (VS: Do not select a Windows SDK too high for current VS version, 2017-08-07, v3.13.0-rc1~72^2~2) we enforce a maximum SDK version for the VS 2015 generator. The blog post linked in the original commit is no longer available, but it can be seen here: * https://web.archive.org/web/20190108032520/https://blogs.msdn.microsoft.com/chuckw/2018/10/02/windows-10-october-2018-update/ In particular, it states: > VS 2015 Users: The Windows 10 SDK (15063, 16299, 17134, 17763) > is officially only supported for VS 2017. However, in some circumstances a higher version can be used. Add a `CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` to override the generator's default maximum SDK version. Fixes: #20633
64 lines
2.0 KiB
C++
64 lines
2.0 KiB
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#ifndef cmGlobalVisualStudio14Generator_h
|
|
#define cmGlobalVisualStudio14Generator_h
|
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
#include <iosfwd>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "cmGlobalVisualStudio12Generator.h"
|
|
|
|
class cmGlobalGeneratorFactory;
|
|
class cmMakefile;
|
|
class cmake;
|
|
|
|
/** \class cmGlobalVisualStudio14Generator */
|
|
class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator
|
|
{
|
|
public:
|
|
static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
|
|
|
|
bool MatchesGeneratorName(const std::string& name) const override;
|
|
|
|
const char* GetAndroidApplicationTypeRevision() const override
|
|
{
|
|
return "2.0";
|
|
}
|
|
|
|
protected:
|
|
cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name,
|
|
std::string const& platformInGeneratorName);
|
|
|
|
bool InitializeWindows(cmMakefile* mf) override;
|
|
bool InitializeWindowsStore(cmMakefile* mf) override;
|
|
bool InitializeAndroid(cmMakefile* mf) override;
|
|
bool SelectWindowsStoreToolset(std::string& toolset) const override;
|
|
|
|
// These aren't virtual because we need to check if the selected version
|
|
// of the toolset is installed
|
|
bool IsWindowsStoreToolsetInstalled() const;
|
|
|
|
// Used to make sure that the Windows 10 SDK selected can work with the
|
|
// version of the toolset.
|
|
virtual std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
|
|
|
|
virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
|
|
|
|
void SetWindowsTargetPlatformVersion(std::string const& version,
|
|
cmMakefile* mf);
|
|
|
|
// Used to verify that the Desktop toolset for the current generator is
|
|
// installed on the machine.
|
|
bool IsWindowsDesktopToolsetInstalled() const override;
|
|
|
|
std::string GetWindows10SDKVersion(cmMakefile* mf);
|
|
|
|
private:
|
|
class Factory;
|
|
friend class Factory;
|
|
};
|
|
#endif
|