summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-12-09 18:58:55 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-12-09 18:58:55 (GMT)
commit92b6c8e742df5112afd8b9cf4d0c752fe02a0619 (patch)
treeb1aeef55649f9a93cb0342447225b43ccd842434 /Source/cmDependsC.h
parent3a3ffea532513f823d17276bace8bbe00c8eb50f (diff)
downloadCMake-92b6c8e742df5112afd8b9cf4d0c752fe02a0619.zip
CMake-92b6c8e742df5112afd8b9cf4d0c752fe02a0619.tar.gz
CMake-92b6c8e742df5112afd8b9cf4d0c752fe02a0619.tar.bz2
PERF: apply patch for bug 2575 speeds up depend scanning
Diffstat (limited to 'Source/cmDependsC.h')
-rw-r--r--Source/cmDependsC.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index 04648fd..e9d335f 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -32,7 +32,7 @@ public:
cmDependsC();
cmDependsC(std::vector<std::string> const& includes,
const char* scanRegex, const char* complainRegex,
- std::set<cmStdString> const& generatedFiles);
+ std::set<cmStdString> const& generatedFiles, const cmStdString& cachFileName);
/** Virtual destructor to cleanup subclasses properly. */
virtual ~cmDependsC();
@@ -47,7 +47,7 @@ protected:
std::ostream& internalDepends);
// Method to scan a single file.
- void Scan(std::istream& is, const char* directory);
+ void Scan(std::istream& is, const char* directory, const cmStdString& fullName);
// Method to test for the existence of a file.
bool FileExistsOrIsGenerated(const std::string& fname,
@@ -74,10 +74,24 @@ protected:
cmStdString FileName;
cmStdString QuotedLocation;
};
+
+ struct cmIncludeLines
+ {
+ cmIncludeLines():used(false) {}
+ std::list<UnscannedEntry> list;
+ bool used;
+ };
+
std::set<cmStdString> m_Encountered;
std::queue<UnscannedEntry> m_Unscanned;
t_CharBuffer m_Buffer;
+ std::map<cmStdString, cmIncludeLines *> m_fileCache;
+
+ cmStdString m_cacheFileName;
+
+ void WriteCacheFile() const;
+ void ReadCacheFile();
private:
cmDependsC(cmDependsC const&); // Purposely not implemented.
void operator=(cmDependsC const&); // Purposely not implemented.