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
22
namespace
q3
{
23
24
/// One add-on compiled into this build.
25
struct
AddonIdentity
{
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.
31
inline
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
q3
Definition
q3_core_api.hpp:33
q3::active_addons
const std::vector< AddonIdentity > & active_addons()
The add-ons compiled into this build, in the order the build discovered them.
Definition
addon_identity.hpp:31
q3::AddonIdentity
One add-on compiled into this build.
Definition
addon_identity.hpp:25
q3::AddonIdentity::name
const char * name
Definition
addon_identity.hpp:26
q3::AddonIdentity::version
const char * version
Definition
addon_identity.hpp:27
src
layer_0_core
addon_identity.hpp
Generated by
1.9.8