summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-04 20:56:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-06 18:02:08 (GMT)
commit8377d9e00b7a00f1687b947aaf3c9e10b6779df4 (patch)
tree5aeac7e4e6d844d3595047aeca0da52a879bea19 /Source/cmDependsFortran.cxx
parent00173b71d97f81cc9db9b573998bd4359aa2c25b (diff)
downloadCMake-8377d9e00b7a00f1687b947aaf3c9e10b6779df4.zip
CMake-8377d9e00b7a00f1687b947aaf3c9e10b6779df4.tar.gz
CMake-8377d9e00b7a00f1687b947aaf3c9e10b6779df4.tar.bz2
Fortran: Inline conversion to relative path
Don't use cmOutputConverter method which relies on directory-specific state.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx6
1 files changed, 5 insertions, 1 deletions
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);
}