Browse Source

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.
Brad King 4 years ago
parent
commit
ec1ea13066
1 changed files with 1 additions and 7 deletions
  1. 1 7
      Source/cmDependsFortran.cxx

+ 1 - 7
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);
 }