summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-11 21:59:20 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-12 13:36:40 (GMT)
commit58a50a3a0aa814c0fb00720cb8fc9edb2cf72344 (patch)
tree19b9ef83bef46cff1ae566967ca629727df2ca63 /Source/cmGlobalVisualStudio10Generator.h
parent09f59da7f09ef864c592cb7e3ffd26373ae2f705 (diff)
downloadCMake-58a50a3a0aa814c0fb00720cb8fc9edb2cf72344.zip
CMake-58a50a3a0aa814c0fb00720cb8fc9edb2cf72344.tar.gz
CMake-58a50a3a0aa814c0fb00720cb8fc9edb2cf72344.tar.bz2
VS: Fix '-T version=14.28' under VS 16.9
CMake accepts the toolset version that is default in the current VS version by matching the name later VS versions will use for the SxS props files. It predicts the future name based on the first two components of the current VS version's default toolset. However, this heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9 because the latter's default toolset version is 14.28.29910, which did not increment the second version component (unprecedented in VS). Fix this by always using the requested version's SxS props file when it exists, even if it matches the first two components of the current VS version's default toolset. Also add a special case for the name VS 16.10 will use for VS 16.9's default toolset, so that it can be used with VS 16.9 too. Fixes: #21922
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.h')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 65ea33f..8d30ef8 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -61,9 +61,8 @@ public:
const char* GetPlatformToolset() const;
std::string const& GetPlatformToolsetString() const;
- /** The toolset version. */
- const char* GetPlatformToolsetVersion() const;
- std::string const& GetPlatformToolsetVersionString() const;
+ /** The toolset version props file, if any. */
+ std::string const& GetPlatformToolsetVersionProps() const;
/** The toolset host architecture name (e.g. x64 for 64-bit host tools). */
const char* GetPlatformToolsetHostArchitecture() const;
@@ -120,9 +119,6 @@ public:
std::string Encoding() override;
const char* GetToolsVersion() const;
- virtual bool IsDefaultToolset(const std::string& version) const;
- virtual std::string GetAuxiliaryToolset() const;
-
bool GetSupportsUnityBuilds() const { return this->SupportsUnityBuilds; }
bool FindMakeProgram(cmMakefile* mf) override;
@@ -168,6 +164,16 @@ protected:
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
+ enum class AuxToolset
+ {
+ None,
+ Default,
+ PropsExist,
+ PropsMissing
+ };
+ virtual AuxToolset FindAuxToolset(std::string& version,
+ std::string& props) const;
+
std::string const& GetMSBuildCommand();
cmIDEFlagTable const* LoadFlagTable(std::string const& optionsName,
@@ -176,7 +182,7 @@ protected:
std::string const& table) const;
std::string GeneratorToolset;
- std::string GeneratorToolsetVersion;
+ std::string GeneratorToolsetVersionProps;
std::string GeneratorToolsetHostArchitecture;
std::string GeneratorToolsetCustomVCTargetsDir;
std::string GeneratorToolsetCuda;
@@ -230,6 +236,8 @@ private:
std::string FindDevEnvCommand() override;
std::string GetVSMakeProgram() override { return this->GetMSBuildCommand(); }
+ std::string GeneratorToolsetVersion;
+
bool PlatformToolsetNeedsDebugEnum;
bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf);