summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-09 08:47:43 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-09 08:47:43 (GMT)
commit378849f41e574e72c577b549dfc2d5333ca8f9b5 (patch)
tree5ecdbb37075ae9f1c40dd1a519f9edf9b17ed13b /Source
parent4a3c49b4698f0e8c20c345770f551142088a3037 (diff)
downloadCMake-378849f41e574e72c577b549dfc2d5333ca8f9b5.zip
CMake-378849f41e574e72c577b549dfc2d5333ca8f9b5.tar.gz
CMake-378849f41e574e72c577b549dfc2d5333ca8f9b5.tar.bz2
Makefiles: Replace array access with local variable
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 5b4ecc7..eebab68 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -995,14 +995,15 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
std::string output;
const std::vector<std::string>& outputs = ccg.GetOutputs();
if (!outputs.empty()) {
+ output = outputs[0];
if (workingDir.empty()) {
output = this->MaybeConvertToRelativePath(
- this->GetCurrentBinaryDirectory(), outputs[0]);
- output = this->ConvertToOutputFormat(output,
- cmOutputConverter::SHELL);
+ this->GetCurrentBinaryDirectory(), output);
+ output =
+ this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
} else {
- output = this->ConvertToOutputFormat(outputs[0],
- cmOutputConverter::SHELL);
+ output =
+ this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
}
}
vars.Output = output.c_str();