From 8377d9e00b7a00f1687b947aaf3c9e10b6779df4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Oct 2016 22:56:31 +0200 Subject: Fortran: Inline conversion to relative path Don't use cmOutputConverter method which relies on directory-specific state. --- Source/cmDependsFortran.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 4c0f688..aaa9d3a 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -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); } -- cgit v0.12