summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-07 19:57:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-14 13:22:26 (GMT)
commitd079e71c290c3c55a2db5180953daf014a964c25 (patch)
treea2b7f24b599049e22e21fedca8fd9955e5c0d616 /Source/cmGlobalXCodeGenerator.cxx
parent779939a00ebc21419404737f2fc2b34e7775f086 (diff)
downloadCMake-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/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 75fc2e4..0ddfc9a 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -220,6 +220,19 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
cmMakefile* mf)
{
if (this->XcodeVersion >= 30) {
+ if (ts.find_first_of(",=") != ts.npos) {
+ std::ostringstream e;
+ /* clang-format off */
+ e <<
+ "Generator\n"
+ " " << this->GetName() << "\n"
+ "does not recognize the toolset\n"
+ " " << ts << "\n"
+ "that was specified.";
+ /* clang-format on */
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return false;
+ }
this->GeneratorToolset = ts;
if (!this->GeneratorToolset.empty()) {
mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET",