diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index dba4f46..bb818eb 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -76,7 +76,8 @@ cmGlobalGenerator::~cmGlobalGenerator() } } -bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts) +bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts, + cmMakefile* mf) { cmOStringStream e; e << @@ -85,8 +86,7 @@ bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts) "does not support toolset specification, but toolset\n" " " << ts << "\n" "was specified."; - this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(), - cmListFileBacktrace()); + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); return false; } @@ -448,6 +448,15 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages, mf->ReadListFile(0,fpath.c_str()); } + // Tell the generator about the toolset, if any. + std::string toolset = mf->GetSafeDefinition("CMAKE_GENERATOR_TOOLSET"); + if(!toolset.empty() && + !this->SetGeneratorToolset(toolset, mf)) + { + cmSystemTools::SetFatalErrorOccured(); + return; + } + // **** Load the system specific initialization if not yet loaded if (!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INITIALIZE_LOADED")) { |