summaryrefslogtreecommitdiff
path: root/Source/cmOutputConverter.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-04 22:56:30 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-06 20:02:03 +0200
commite278f5a84806a2b228182dc4a2cc98a1eaa19f8c (patch)
tree0100588def9f3694c5a9658a0fc37dd7270ac6fd /Source/cmOutputConverter.cxx
parent51bc6bddb91283da25d098492c9cc1b50e3008fc (diff)
downloadcmake-e278f5a84806a2b228182dc4a2cc98a1eaa19f8c.tar.gz
Convert: Extract local variables
Remove comment made obsolete by them.
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r--Source/cmOutputConverter.cxx31
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 0b270aa12e..eee1988814 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -91,20 +91,23 @@ std::string cmOutputConverter::ConvertToRelativePath(
return remote_path;
}
- // Skip conversion if the path and local are not both in the source
- // or both in the binary tree.
- if (!((cmOutputConverterNotAbove(
- local_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) &&
- cmOutputConverterNotAbove(
- remote_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) ||
- (cmOutputConverterNotAbove(
- local_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) &&
- cmOutputConverterNotAbove(
- remote_path.c_str(),
- this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) {
+ const bool bothInBinary =
+ cmOutputConverterNotAbove(
+ local_path.c_str(),
+ this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) &&
+ cmOutputConverterNotAbove(
+ remote_path.c_str(),
+ this->StateSnapshot.GetDirectory().GetRelativePathTopBinary());
+
+ const bool bothInSource =
+ cmOutputConverterNotAbove(
+ local_path.c_str(),
+ this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) &&
+ cmOutputConverterNotAbove(
+ remote_path.c_str(),
+ this->StateSnapshot.GetDirectory().GetRelativePathTopSource());
+
+ if (!(bothInSource || bothInBinary)) {
return remote_path;
}