Fortran: Inline conversion to relative path

Don't use cmOutputConverter method which relies on directory-specific
state.
This commit is contained in:
Stephen Kelly 2016-10-04 22:56:31 +02:00
parent 00173b71d9
commit 8377d9e00b

View File

@ -707,5 +707,9 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
std::string cmDependsFortran::MaybeConvertToRelativePath(
std::string const& base, std::string const& path)
{
return this->LocalGenerator->ConvertToRelativePath(base, path);
if (!cmOutputConverter::ContainedInDirectory(
base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) {
return path;
}
return cmOutputConverter::ForceToRelativePath(base, path);
}