summaryrefslogtreecommitdiffstats
path: root/Source/cmFileAPI.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileAPI.h')
-rw-r--r--Source/cmFileAPI.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/Source/cmFileAPI.h b/Source/cmFileAPI.h
index 6d7678f..1c13d7b 100644
--- a/Source/cmFileAPI.h
+++ b/Source/cmFileAPI.h
@@ -41,6 +41,20 @@ public:
/** Report file-api capabilities for cmake -E capabilities. */
static Json::Value ReportCapabilities();
+ // Keep in sync with ObjectKindName.
+ enum class ObjectKind
+ {
+ CodeModel,
+ ConfigureLog,
+ Cache,
+ CMakeFiles,
+ Toolchains,
+ InternalTest
+ };
+
+ bool AddProjectQuery(ObjectKind kind, unsigned majorVersion,
+ unsigned minorVersion);
+
private:
cmake* CMakeInstance;
@@ -53,17 +67,6 @@ private:
static std::vector<std::string> LoadDir(std::string const& dir);
void RemoveOldReplyFiles();
- // Keep in sync with ObjectKindName.
- enum class ObjectKind
- {
- CodeModel,
- ConfigureLog,
- Cache,
- CMakeFiles,
- Toolchains,
- InternalTest
- };
-
/** Identify one object kind and major version. */
struct Object
{
@@ -76,6 +79,14 @@ private:
}
return l.Version < r.Version;
}
+ friend bool operator==(Object const& l, Object const& r)
+ {
+ return l.Kind == r.Kind && l.Version == r.Version;
+ }
+ friend bool operator!=(Object const& l, Object const& r)
+ {
+ return !(l == r);
+ }
};
/** Represent content of a query directory. */