A collection of useful C++ routines.
Go to file
2024-10-29 14:02:10 +10:00
cruft/util ranges: add izip helper 2024-10-29 14:02:10 +10:00
test build: bump fmtlib to 11 2024-10-16 11:19:35 +10:00
tools build: bump fmtlib to 11 2024-10-16 11:19:35 +10:00
.gitignore build; remove unnecessary gitignore entries 2018-08-06 14:36:23 +10:00
.gitlab-ci.yml build;gitlab: set CMAKE_MODULE_PATH to our local cmake modules 2019-06-29 09:13:26 +10:00
.gitmodules build: don't include cmake modules in this repository 2018-07-24 16:16:53 +10:00
CMakeLists.txt Move source out of root and into the cruft directory 2024-07-18 12:27:05 +10:00
conanfile.txt build: bump fmtlib to 11 2024-10-16 11:19:35 +10:00
COPYING relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
Doxyfile.in Doxyfile: Use CMake variables in preference to autotools variables 2019-01-03 11:15:00 +11:00
libcruft.pc.in build: correctly install the pkg-config file 2019-06-18 11:26:59 +10:00
meson.build Move source out of root and into the cruft directory 2024-07-18 12:27:05 +10:00
meson.options Move source out of root and into the cruft directory 2024-07-18 12:27:05 +10:00
preprocessor.py preprocessor: add COUNT_MAP 2021-02-02 11:41:26 +10:00
README.adoc thread: remove thread, mutex, and condition_variable wrappers 2020-08-03 11:21:29 +10:00

== libcruft

A simple cross-platform C++ utility library.

Supported compilers: >=clang-10.x, >=gcc10.x; specifically, we require cxx17 features such as structured bindings which aren't present in older compilers. No attempt has been made to compile under MSVC.

MinGW must be compiled with PThreads support so that the std threading API is available.

=== Environment Variables

The following variables can be defined at runtime to change the library behaviour.

DEBUG:: whether to initialise basic debugging features at load time. the value is irrelevant; the test is for whether the variable is defined.
DEBUG_WAIT:: whether to wait for a debugger to attach before executing `main`.

LOG_LEVEL:: minimum log level that will render to the logging stream. note that a given level may have been compiled out and may not be present, eg. DEBUG tends to only be present for debug builds.
BREAK_LEVEL:: minimum log level that will trigger a breakpoint

CRUFT_LOG_SINK:: The output driver for logging. One of 'CONSOLE', 'PATH'.
CRUFT_LOG_PATH:: The output path for the 'PATH' logging driver. This path is subject to path expansion and will be interpreted as relative to the current working directory if it is relative.

JOB_THREADS:: default number of threads to spin up for job queues.
JOB_DEPTH:: the default size of the pending work item queue for a job queue.

Ideally one would not resort to using these variables, but they may make debugging a little easier in some circumstances.