- C++ 91.4%
- CMake 6.1%
- Meson 2.5%
| cmake | Improve cmake dependency handling | |
| extras | Provide llmt-git.wrap | |
| include/llmt | Make function_traits work with more callable types | |
| subprojects | Use full commit hash for cpp-test-helpers.wrap | |
| tests | Make function_traits work with more callable types | |
| CMakeLists.txt | Add raw test bin, bump version | |
| LICENCE.md | License with Apache 2.0 with LLVM Exceptions | |
| meson.build | Add super simple function traits class | |
| meson.options | Finish basic project structure | |
| README.md | Rel 0.1.0 cleanup | |
Library metatoolkit
This is a library to build libraries.
Configuration macroes
llmt allows some configuration of how it works via preprocessor definitions
| definition | default value | notes |
|---|---|---|
LLMT_NAMESPACE |
llmt | the namespace used by the llmt library |
LLMT_FREESTANDING |
can be defined to build as freestanding, defined by default if __STDC_HOSTED__ == 0 |
|
LLMT_DEFAULT_ALLOCATOR |
std::allocator* |
default allocator to use with allocator-aware functionality, undefined in freestanding |
LLMT_BOUNDS_ERROR(msg) |
LLMT_TRAP(msg) |
can be defined to customise behaviour in case of bounds error |
LLMT_BAD_ACCESS(msg) |
throw std::logic_error(msg) |
can be defined to customise behaviour in case of bad access, will be LLMT_TRAP(msg) by default if exceptions are disabled |
LLMT_ALLOCATION_FAILURE(msg) |
LLMT_TRAP(msg) |
can be defined to customise behaviour in case of an allocation failure |
LLMT_DISABLE_COMPILER_BUILTIN_POPCOUNT |
can be defined to disable use of compiler-builtin popcount |
If a custom handler for allocation failure is set, it is possible to #define LLMT_NOTHROW_ALLOCATION_FAILURE to tell
the library that allocation failures do not throw.
How to use
With meson
llmt uses meson as its main build system. extras subdirectory contains wrap files for
each release and a llmt-git.wrap that can be used for the HEAD version.
With CMake
If you use cmake, llmt also includes CMakeLists.txt, and exports llmt::llmt target.
It is probably most easily used with CMake FetchContent,
llmt uses it internally to fetch doctest to build unit tests.
CMakeLists.txt are not guaranteed to be up to date in non-release versions. Release tag
CMakeLists should be up to date.