summaryrefslogtreecommitdiff
path: root/Source/cmDependsC.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-09-23 14:02:05 -0400
committerAlexander Neundorf <neundorf@kde.org>2009-09-23 14:02:05 -0400
commit39383ef8cb691656012275721064baef1e4f7511 (patch)
tree8d16274bd2092a6abe925bc7756c8a23594fd4b6 /Source/cmDependsC.h
parent551fcc23c220fd75eaeea7671f28e8360e466b75 (diff)
downloadcmake-39383ef8cb691656012275721064baef1e4f7511.tar.gz
Major optimization of C/C++ dependency scanning.
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
Diffstat (limited to 'Source/cmDependsC.h')
-rw-r--r--Source/cmDependsC.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index dafb112eb9..0830ccaf44 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -30,7 +30,8 @@ public:
/** Checking instances need to know the build directory name and the
relative path from the build directory to the target file. */
cmDependsC();
- cmDependsC(cmLocalGenerator* lg, const char* targetDir, const char* lang);
+ cmDependsC(cmLocalGenerator* lg, const char* targetDir, const char* lang,
+ const std::map<std::string, DependencyVector>* validDeps);
/** Virtual destructor to cleanup subclasses properly. */
virtual ~cmDependsC();
@@ -83,6 +84,7 @@ public:
bool Used;
};
protected:
+ const std::map<std::string, DependencyVector>* ValidDeps;
std::set<cmStdString> Encountered;
std::queue<UnscannedEntry> Unscanned;
t_CharBuffer Buffer;