Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
addon_identity.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * Which build-time add-ons this build compiled in, for `--version` and the
5 * provenance block of a results file.
6 *
7 * The list comes from q3_addon_identity.hpp, which cmake/Q3Addons.cmake writes
8 * at configure time from the add-ons present in the tree. A result computed
9 * with an add-on can depend on it, so the record names it; a core-only build
10 * reports an empty list rather than omitting the field, so the absence of
11 * add-ons is stated rather than inferred. Without the generated header (a tool
12 * compiling a header on its own, outside the build) the list is empty, the
13 * same honest default version.hpp uses for the commit.
14 */
15
16#include <vector>
17
18#if __has_include(<q3_addon_identity.hpp>)
19#include <q3_addon_identity.hpp>
20#endif
21
22namespace q3 {
23
24/// One add-on compiled into this build.
26 const char* name;
27 const char* version;
28};
29
30/// The add-ons compiled into this build, in the order the build discovered them.
31inline const std::vector<AddonIdentity>& active_addons() {
32 static const std::vector<AddonIdentity> addons{
33#ifdef Q3_ADDON_IDENTITY_ENTRIES
34 Q3_ADDON_IDENTITY_ENTRIES
35#endif
36 };
37 return addons;
38}
39
40} // namespace q3
const std::vector< AddonIdentity > & active_addons()
The add-ons compiled into this build, in the order the build discovered them.
One add-on compiled into this build.