Compile-time helpers that capture the build date, time and git commit hash into the binary. More...
#include <cstring>

Go to the source code of this file.
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
Functions | |
| constexpr auto | UTILSLIB::timeNowNow () |
| constexpr auto | UTILSLIB::dateToday () |
| constexpr auto | UTILSLIB::dateTimeNow () |
| constexpr auto | UTILSLIB::gitHash () |
| constexpr auto | UTILSLIB::gitHashLong () |
Compile-time helpers that capture the build date, time and git commit hash into the binary.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2021-2026 MNE-CPP Authors
Every accessor is a header-only constexpr function so the __DATE__ / __TIME__ macros and the MNE_GIT_HASH_* defines (injected by CMake at configure time) are evaluated in the translation unit that invokes them. The values are picked up by utils_global.cpp exactly once so every mne-cpp binary reports a single, stable build identifier in its About dialog, CLI --version banner, and crash logs.
When git metadata is unavailable (source tarball builds, shallow CI checkouts) the hash accessors return a constant sentinel string instead of failing the build.
Definition in file buildinfo.h.