diff options
author | Brad King <brad.king@kitware.com> | 2016-10-26 13:28:19 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-26 13:28:19 (GMT) |
commit | fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213 (patch) | |
tree | 05a8472df063f14746ca864742fec33859d4370d /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | fa15858a7eee3a6feb84bd39b01478c2116ab21e (diff) | |
parent | 69fc7bf87db33d88af02602fba811b5c5e740a70 (diff) | |
download | CMake-fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213.zip CMake-fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213.tar.gz CMake-fdd0ce915c0ab7e5a9f3b95612b35d845a7a5213.tar.bz2 |
Merge topic 'vs-toolset-options'
69fc7bf8 VS: Choose flag map based on the toolset name
e2ed9a70 VS: Move toolset flag table lookup to global generator
584ab528 VS: Add internal API to get platform toolset as string
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 7af971e..7d91740 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -9,6 +9,11 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmVS10CLFlagTable.h" +#include "cmVS10LibFlagTable.h" +#include "cmVS10LinkFlagTable.h" +#include "cmVS10MASMFlagTable.h" +#include "cmVS10RCFlagTable.h" #include "cmVisualStudioSlnData.h" #include "cmVisualStudioSlnParser.h" #include "cmake.h" @@ -94,6 +99,11 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->SystemIsWindowsStore = false; this->MSBuildCommandInitialized = false; this->DefaultPlatformToolset = "v100"; + this->DefaultClFlagTable = cmVS10CLFlagTable; + this->DefaultLibFlagTable = cmVS10LibFlagTable; + this->DefaultLinkFlagTable = cmVS10LinkFlagTable; + this->DefaultMasmFlagTable = cmVS10MASMFlagTable; + this->DefaultRcFlagTable = cmVS10RCFlagTable; this->Version = VS10; } @@ -339,13 +349,20 @@ void cmGlobalVisualStudio10Generator::EnableLanguage( const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const { + return this->GetPlatformToolsetString().c_str(); +} + +std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString() + const +{ if (!this->GeneratorToolset.empty()) { - return this->GeneratorToolset.c_str(); + return this->GeneratorToolset; } if (!this->DefaultPlatformToolset.empty()) { - return this->DefaultPlatformToolset.c_str(); + return this->DefaultPlatformToolset; } - return 0; + static std::string const empty; + return empty; } const char* @@ -597,3 +614,43 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion() version, cmSystemTools::KeyWOW64_32); return version; } + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetClFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultClFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetRcFlagTable() const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetRcFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultRcFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLibFlagTable() const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetLibFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultLibFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetLinkFlagTable() const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetLinkFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultLinkFlagTable; +} + +cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const +{ + cmIDEFlagTable const* table = this->ToolsetOptions.GetMasmFlagTable( + this->GetPlatformName(), this->GetPlatformToolsetString()); + + return (table != CM_NULLPTR) ? table : this->DefaultMasmFlagTable; +} |