diff options
author | Brad King <brad.king@kitware.com> | 2016-10-07 19:57:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-14 13:22:26 (GMT) |
commit | d079e71c290c3c55a2db5180953daf014a964c25 (patch) | |
tree | a2b7f24b599049e22e21fedca8fd9955e5c0d616 /Source/cmGlobalVisualStudio12Generator.cxx | |
parent | 779939a00ebc21419404737f2fc2b34e7775f086 (diff) | |
download | CMake-d079e71c290c3c55a2db5180953daf014a964c25.zip CMake-d079e71c290c3c55a2db5180953daf014a964c25.tar.gz CMake-d079e71c290c3c55a2db5180953daf014a964c25.tar.bz2 |
VS: Provide an option to use x64 host tools
Visual Studio provides toolchains that are themselves built for 32-bit
or 64-bit host architectures. By default it uses the 32-bit tools, but
it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the
`CMAKE_GENERATOR_TOOLSET` specification to provide a way to request
use of the 64-bit host tools.
Closes: #15622
Diffstat (limited to 'Source/cmGlobalVisualStudio12Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio12Generator.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 5fdeec7..ec7916c 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -96,6 +96,21 @@ bool cmGlobalVisualStudio12Generator::MatchesGeneratorName( return false; } +bool cmGlobalVisualStudio12Generator::ParseGeneratorToolset( + std::string const& ts, cmMakefile* mf) +{ + std::string::size_type ts_end = ts.size(); + if (cmHasLiteralSuffix(ts, ",host=x64")) { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end -= 9; + } else if (ts == "host=x64") { + this->GeneratorToolsetHostArchitecture = "x64"; + ts_end = 0; + } + return this->cmGlobalVisualStudio11Generator::ParseGeneratorToolset( + ts.substr(0, ts_end), mf); +} + bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) { if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) { |