diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-09-30 17:53:01 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-06 11:54:39 -0500 |
commit | e74ff7c29fc764af63ed3f5195ecc64730c07939 (patch) | |
tree | 9aca0b2d414e299638ecc803dddc7c6d438e9749 /Source/cmDepends.h | |
parent | ecc77d09b8996b59bf22bc36e06fa4bb52d665ee (diff) | |
download | cmake-e74ff7c29fc764af63ed3f5195ecc64730c07939.tar.gz |
cmDepends: allow multiple dependees per depender
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>
Diffstat (limited to 'Source/cmDepends.h')
-rw-r--r-- | Source/cmDepends.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmDepends.h b/Source/cmDepends.h index f7dc8811ea..d787eddc6f 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -76,8 +76,10 @@ protected: // Write dependencies for the target file to the given stream. // Return true for success and false for failure. - virtual bool WriteDependencies(const char *src, const char* obj, - std::ostream& makeDepends, std::ostream& internalDepends); + virtual bool WriteDependencies(const std::set<std::string>& sources, + const std::string& obj, + std::ostream& makeDepends, + std::ostream& internalDepends); // Check dependencies for the target file in the given stream. // Return false if dependencies must be regenerated and true |