1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-24 11:32:44 +08:00

Convert: Extract local variables

Remove comment made obsolete by them.
This commit is contained in:
Stephen Kelly
2016-10-04 22:56:30 +02:00
parent 51bc6bddb9
commit e278f5a848

View File

@@ -91,20 +91,23 @@ std::string cmOutputConverter::ConvertToRelativePath(
return remote_path; return remote_path;
} }
// Skip conversion if the path and local are not both in the source const bool bothInBinary =
// or both in the binary tree. cmOutputConverterNotAbove(
if (!((cmOutputConverterNotAbove( local_path.c_str(),
local_path.c_str(), this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) &&
this->StateSnapshot.GetDirectory().GetRelativePathTopBinary()) && cmOutputConverterNotAbove(
cmOutputConverterNotAbove( remote_path.c_str(),
remote_path.c_str(), this->StateSnapshot.GetDirectory().GetRelativePathTopBinary());
this->StateSnapshot.GetDirectory().GetRelativePathTopBinary())) ||
(cmOutputConverterNotAbove( const bool bothInSource =
local_path.c_str(), cmOutputConverterNotAbove(
this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) && local_path.c_str(),
cmOutputConverterNotAbove( this->StateSnapshot.GetDirectory().GetRelativePathTopSource()) &&
remote_path.c_str(), cmOutputConverterNotAbove(
this->StateSnapshot.GetDirectory().GetRelativePathTopSource())))) { remote_path.c_str(),
this->StateSnapshot.GetDirectory().GetRelativePathTopSource());
if (!(bothInSource || bothInBinary)) {
return remote_path; return remote_path;
} }