summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorDon Olmstead <don.j.olmstead@gmail.com>2016-10-18 00:50:34 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-25 13:46:21 (GMT)
commit69fc7bf87db33d88af02602fba811b5c5e740a70 (patch)
tree9c506a4e79bc0912107d78cb1f05368399f18c53 /Source/cmGlobalVisualStudio10Generator.cxx
parente2ed9a70929092ab7b32e036886859e53fbff897 (diff)
downloadCMake-69fc7bf87db33d88af02602fba811b5c5e740a70.zip
CMake-69fc7bf87db33d88af02602fba811b5c5e740a70.tar.gz
CMake-69fc7bf87db33d88af02602fba811b5c5e740a70.tar.bz2
VS: Choose flag map based on the toolset name
MSBuild interprets the `.vcxproj` content based on the `PlatformToolset` setting, so our reverse mapping needs to be based on that setting too. For VS 2010 and above, choose the flag map to match the toolset name rather than the generator VS version. Issue: #16153
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 6075e2c..7d91740 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -617,25 +617,40 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion()
cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const
{
- return this->DefaultClFlagTable;
+ cmIDEFlagTable const* table = this->ToolsetOptions.GetClFlagTable(
+ this->GetPlatformName(), this->GetPlatformToolsetString());
+
+ return (table != CM_NULLPTR) ? table : this->DefaultClFlagTable;
}
cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const
{
- return this->DefaultRcFlagTable;
+ cmIDEFlagTable const* table = this->ToolsetOptions.GetRcFlagTable(
+ this->GetPlatformName(), this->GetPlatformToolsetString());
+
+ return (table != CM_NULLPTR) ? table : this->DefaultRcFlagTable;
}
cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLibFlagTable() const
{
- return this->DefaultLibFlagTable;
+ cmIDEFlagTable const* table = this->ToolsetOptions.GetLibFlagTable(
+ this->GetPlatformName(), this->GetPlatformToolsetString());
+
+ return (table != CM_NULLPTR) ? table : this->DefaultLibFlagTable;
}
cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLinkFlagTable() const
{
- return this->DefaultLinkFlagTable;
+ cmIDEFlagTable const* table = this->ToolsetOptions.GetLinkFlagTable(
+ this->GetPlatformName(), this->GetPlatformToolsetString());
+
+ return (table != CM_NULLPTR) ? table : this->DefaultLinkFlagTable;
}
cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const
{
- return this->DefaultMasmFlagTable;
+ cmIDEFlagTable const* table = this->ToolsetOptions.GetMasmFlagTable(
+ this->GetPlatformName(), this->GetPlatformToolsetString());
+
+ return (table != CM_NULLPTR) ? table : this->DefaultMasmFlagTable;
}