compat.spdlog
#includeFast C++ logging library (header-only by default, compiled via the `compiled` feature)
#include <spdlog/spdlog.h>
mcpp add compat.spdlog@1.17.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test: consume compat.spdlog in COMPILED mode. Asserts both halves
// of what the `compiled` feature promises:
//
// 1. the interface define reached this TU (SPDLOG_COMPILED_LIB defined, and
// spdlog's headers therefore did NOT flip on SPDLOG_HEADER_ONLY) — a
// static check, so a regression is a compile error, not a silent fallback
// to the header-only path that would still pass the runtime assertions;
// 2. spdlog's src/*.cpp really were compiled and linked — the calls below
// resolve to out-of-line symbols (default_logger_raw, log_msg's ctor,
// logger::log_it_, and bundled fmt's vformat), which is exactly what fails
// to link when the engine skips a feature's sources.
#include <spdlog/spdlog.h>
#include <spdlog/sinks/ostream_sink.h>
#include <sstream>
#include <string>
#ifndef SPDLOG_COMPILED_LIB
#error "compiled feature did not propagate SPDLOG_COMPILED_LIB to the consumer"
#endif
#ifdef SPDLOG_HEADER_ONLY
#error "SPDLOG_HEADER_ONLY is on in compiled mode — headers took the inline path"
#endif
// …
tests/examples/spdlog-compiled/tests/compiled_test.cpp · project tests/examples/spdlog-compiled
openkal
| target | result | environment | test project | first diagnostic |
|---|---|---|---|---|
| x86_64-linux-gnu | runs | posix | spdlog | |
| x86_64-windows-musl | runs | posix | spdlog |
How this was measured
Measured 2026-09-23 by tests/openkal/compat.py with openkal-llvm-runtime 0.15.1, llvm@22.1.8, mcpp 2026.9.21.3. The test project selects no platform dependency of its own. The badge above is a summary of the strictest measured target -- the table above states each target's own environment.
Build
- targets
spdlog (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include
Features
| feature | declares |
|---|---|
| compiled | sources, defines |
Sources (1)
mcpp_generated/spdlog_anchor.c
Generated files
mcpp_generated/spdlog_anchor.c
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
1.17.0 latest |
LinuxWindowsmacOS | source | d8862955c6d7… |