Loading...
Searching...
No Matches
addon_registration.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * q3::addons::register_all() — register every build-time add-on this build
5 * compiled in.
6 *
7 * Every entry point calls it once, as its first statement, so that the
8 * registries (input formats, pseudopotential formats, PAW one-centre
9 * conventions, volumetric formats) are complete before anything parses an
10 * argument or reads an input. It runs before MPI is initialised and before the
11 * logger exists, so registration makes no MPI calls and logs nothing.
12 *
13 * The definition is generated by cmake/Q3Addons.cmake into
14 * q3_addon_registration.hpp. Only entry points include this header, so the
15 * add-on headers that generated file pulls in never enter a core translation
16 * unit. Without the generated header (a tool compiling a header on its own,
17 * outside the build) no add-on is registered.
18 */
19
20#if __has_include(<q3_addon_registration.hpp>)
21#include <q3_addon_registration.hpp>
22#else
23namespace q3::addons {
24
25/// No add-on is compiled in, so there is nothing to register.
26inline void register_all() {}
27
28} // namespace q3::addons
29#endif
void register_all()
No add-on is compiled in, so there is nothing to register.