summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmListFileCache.cxx10
-rw-r--r--Source/cmListFileCache.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 650e2e5b12..3e3d70869b 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -440,3 +440,13 @@ bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs)
}
return lhs.FilePath < rhs.FilePath;
}
+
+bool operator==(const cmListFileContext& lhs, const cmListFileContext& rhs)
+{
+ return lhs.Line == rhs.Line && lhs.FilePath == rhs.FilePath;
+}
+
+bool operator!=(const cmListFileContext& lhs, const cmListFileContext& rhs)
+{
+ return !(lhs == rhs);
+}
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index da89016943..d7e29d9d3c 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -63,6 +63,8 @@ struct cmListFileContext
std::ostream& operator<<(std::ostream&, cmListFileContext const&);
bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs);
+bool operator==(cmListFileContext const& lhs, cmListFileContext const& rhs);
+bool operator!=(cmListFileContext const& lhs, cmListFileContext const& rhs);
struct cmListFileFunction: public cmListFileContext
{