diff options
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 3a89d75..d326ec5 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -788,8 +788,12 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (!compileCommands.empty() && !compilerLauncher.empty()) { std::vector<std::string> args; cmSystemTools::ExpandListArgument(compilerLauncher, args, true); - for (std::string& i : args) { - i = this->LocalGenerator->EscapeForShell(i); + if (!args.empty()) { + args[0] = this->LocalGenerator->ConvertToOutputFormat( + args[0], cmOutputConverter::SHELL); + for (std::string& i : cmMakeRange(args.begin() + 1, args.end())) { + i = this->LocalGenerator->EscapeForShell(i); + } } compileCommands.front().insert(0, cmJoin(args, " ") + " "); } |