diff options
author | Brad King <brad.king@kitware.com> | 2016-10-10 14:23:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-10 14:23:42 (GMT) |
commit | ea533eb71516a92e1528e358ffa374b16864eac6 (patch) | |
tree | 9fcc5100a0d53e5ad5528d350b918d1a90b38a83 | |
parent | 8fe948c54cd0a7a06b5c56e8a40dab945c5a08e7 (diff) | |
parent | cc5e6b82c2ae8293a400b604e0366578f9097d94 (diff) | |
download | CMake-ea533eb71516a92e1528e358ffa374b16864eac6.zip CMake-ea533eb71516a92e1528e358ffa374b16864eac6.tar.gz CMake-ea533eb71516a92e1528e358ffa374b16864eac6.tar.bz2 |
Merge topic 'ninja-cleanups'
cc5e6b82 Ninja: Extract identical code from condition
d9fde87d Ninja: Replace array access with local variable
d92c160d Ninja: Separate two coupled calls
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 5736581..b04c11d 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -488,15 +488,12 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( std::string output; const std::vector<std::string>& outputs = ccg.GetOutputs(); if (!outputs.empty()) { + output = outputs[0]; if (ccg.GetWorkingDirectory().empty()) { - output = this->ConvertToOutputFormat( - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), - outputs[0]), - cmOutputConverter::SHELL); - } else { output = - this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); + this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), output); } + output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } vars.Output = output.c_str(); |