From db02be85a0bcccb633b31f087cde96d95fd21e8f Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Apr 2019 07:40:14 -0400 Subject: VS: Provide the default platform name to project code The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio generators based on `CMAKE_GENERATOR_PLATFORM` or some default. Prior to the VS 2019 generator, the default was always `Win32`. However, for the `Visual Studio 16 2019` generator, the default is based on the host platform. Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for use by project code. This is particularly useful in toolchain files because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so `CMAKE_VS_PLATFORM_NAME` is not yet known. Of course the toolchain file author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that will be used. Fixes: #19177 --- Source/cmGlobalVisualStudioGenerator.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/cmGlobalVisualStudioGenerator.h') diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 039191c6cd..cbab3294dd 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -50,6 +50,9 @@ public: /** Is the installed VS an Express edition? */ bool IsExpressEdition() const { return this->ExpressEdition; } + void EnableLanguage(std::vector const& languages, cmMakefile*, + bool optional) override; + bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; /** -- cgit v1.2.1