summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorYurii Batrak <yuriib@met.no>2017-12-05 12:41:59 (GMT)
committerBrad King <brad.king@kitware.com>2017-12-14 13:22:07 (GMT)
commit7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2 (patch)
tree67cbcbe6c7972b4044a94516dd624351d59a93ed /Source/cmDependsFortran.cxx
parent5f2e2c387deb7f798cbc54d0980503e05873eaaa (diff)
downloadCMake-7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2.zip
CMake-7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2.tar.gz
CMake-7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2.tar.bz2
Makefiles: Drop 'requires' step and its supporting infrastructure
The 'requires' step was used to provide implicit dependencies between the generated Fortran module files and a Fortran target that needs these module files to ensure the correct compilation order. After recent refactoring to resolve all dependencies explicitly through `.mod.stamp` make targets, the separate 'requires' step is not needed anymore.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx32
1 files changed, 1 insertions, 31 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 8b4fafd..23f622b 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -331,24 +331,6 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
continue;
}
- // If the module is provided in this target special handling is
- // needed.
- if (this->Internal->TargetProvides.find(i) !=
- this->Internal->TargetProvides.end()) {
- // The module is provided by a different source in the same
- // target. Add the proxy dependency to make sure the other
- // source builds first.
- std::string proxy = stamp_dir;
- proxy += "/";
- proxy += i;
- proxy += ".mod.proxy";
- proxy = cmSystemTools::ConvertToOutputPath(
- this->MaybeConvertToRelativePath(binDir, proxy).c_str());
-
- // since we require some things add them to our list of requirements
- makeDepends << obj_m << ".requires: " << proxy << std::endl;
- }
-
// The object file should depend on timestamped files for the
// modules it uses.
TargetRequiresMap::const_iterator required =
@@ -373,17 +355,6 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
}
}
- // Write provided modules to the output stream.
- for (std::string const& i : info.Provides) {
- std::string proxy = stamp_dir;
- proxy += "/";
- proxy += i;
- proxy += ".mod.proxy";
- proxy = cmSystemTools::ConvertToOutputPath(
- this->MaybeConvertToRelativePath(binDir, proxy).c_str());
- makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
- }
-
// If any modules are provided then they must be converted to stamp files.
if (!info.Provides.empty()) {
// Create a target to copy the module after the object file
@@ -433,8 +404,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
makeDepends << "\n";
}
makeDepends << obj_m << ".provides.build:\n";
- // After copying the modules update the timestamp file so that
- // copying will not be done again until the source rebuilds.
+ // After copying the modules update the timestamp file.
makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj_m
<< ".provides.build\n";