This patch is heavily inspired by Michael Wild.
The interfaces cmDepends::Write and cmDepends::WriteDependencies where
extended to allow multiple dependees (sources) per depender (object).
cmDepends::Write first collect all dependencies into a std::set before
passing it to cmDepends::WriteDependencies.
cmDependsC::WriteDependencies also first collects all explicit and
implicit dependencies into a std::set and only then writes
depend.{internal,make}. The implementation of cmDependsFortran simply
loops over all sources and proceeds as before, whereas the cmDependsJava
implementation is as trivial as before.
This is for preventing exponential growth of depend.{internal,make} in
the next commit which fixes dependency-vector erasure in
cmDepends::CheckDependencies.
Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
If the depender (e.g. foo.o) does not exist, also rescan dependencies if
one of the dependees (e.g. foo.cxx) is older than the already existing
depend.internal file, since this means it can be out of date.
Alex
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
Now only the dependencies for the file where the dependencies actually may
have changed are rescanned, before that this was done for all source files
even if only one source file had changed.
This reduces e.g. on my machine the time for scanning the dependencies
of kdelibs/khtml/ when only one file (khtml_global.cpp) has changed from
around 7.5 seconds to 1.2 seconds.
The tests succeed, it does what I expected it to do on kdelibs, and Brad
also reviewed the patch, so I think it should be ok.
Alex
- See issue #5809
- Keep information about all sources in the target until deps are written
- Create a fortran.internal file after scanning that lists modules provided
- Load fortran.internal files from linked targets to find modules
- Search the include path for external modules
- Create file-level deps on in-project module timestamps or external mods