From 8b0e4795687a2ea289d1313db24d75bcf3cd13bc Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 9 Oct 2016 10:34:48 +0200 Subject: [PATCH] cmLocalGenerator: Use the language from the compiler container This is just to make follow-up diffs smaller. --- Source/cmLocalGenerator.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a9de948288..c40518035d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -726,17 +726,18 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string arg1 = compIt->first + "_ARG1"; compilerArg1 = this->Makefile->GetDefinition(arg1); compilerTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILER_TARGET"); compilerOptionTarget = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_TARGET"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_TARGET"); compilerExternalToolchain = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILER_EXTERNAL_TOOLCHAIN"); - compilerOptionExternalToolchain = - this->Makefile->GetDefinition(std::string("CMAKE_") + lang + - "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); + std::string("CMAKE_") + compIt->second + + "_COMPILER_EXTERNAL_TOOLCHAIN"); + compilerOptionExternalToolchain = this->Makefile->GetDefinition( + std::string("CMAKE_") + compIt->second + + "_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN"); compilerSysroot = this->Makefile->GetDefinition("CMAKE_SYSROOT"); compilerOptionSysroot = this->Makefile->GetDefinition( - std::string("CMAKE_") + lang + "_COMPILE_OPTIONS_SYSROOT"); + std::string("CMAKE_") + compIt->second + "_COMPILE_OPTIONS_SYSROOT"); } if (actualReplace.find("${LANG}") != actualReplace.npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang);