From ec1ea13066e1b65bfd56ae62bda036f13c950c2d Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 13 May 2021 11:54:15 -0400 Subject: [PATCH] cmDependsFortran: Simplify relative path conversion helper Revert commit 8377d9e00b (Fortran: Inline conversion to relative path, 2016-10-04, v3.8.0-rc1~494^2~4). The inline implementation is still identical to what was previously called. Restore the call again. --- Source/cmDependsFortran.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 1a06f31706..636b5e4111 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -17,8 +17,6 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmProperty.h" -#include "cmStateDirectory.h" -#include "cmStateSnapshot.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -685,9 +683,5 @@ bool cmDependsFortran::ModulesDiffer(const std::string& modFile, std::string cmDependsFortran::MaybeConvertToRelativePath( std::string const& base, std::string const& path) { - if (!this->LocalGenerator->GetStateSnapshot().GetDirectory().ContainsBoth( - base, path)) { - return path; - } - return cmSystemTools::ForceToRelativePath(base, path); + return this->LocalGenerator->MaybeConvertToRelativePath(base, path); }