Core C++ functionality used by other kaycxx libraries and apps.
GitHub | API Documentation
Requirements
- C++23 compiler and standard library
Usage
int main() {
}};
}
Executes a callback when the current scope exits.
Definition scope.hpp:25
Defines scope_exit, a small no-throw scope guard for running cleanup code when the current C++ scope ...
CMake users consume the installed package with:
find_package(kaycxx-core 1.0.0 CONFIG REQUIRED)
target_link_libraries(my-target PRIVATE kaycxx::core)
Non-CMake users can use pkg-config:
c++ $(pkg-config --cflags kaycxx-core) -c main.cpp
c++ main.o $(pkg-config --libs kaycxx-core)
Build From Source
cmake -B build
cmake --build build
A shared library is built by default. For a static build:
cmake -B build -D BUILD_SHARED_LIBS=OFF
cmake --build build
Install
cmake --install build --prefix /tmp/root
If no prefix is specified, CMake installs to /usr/local by default on Unix systems.
Development
Run all tests:
cmake --build build --target test
Generate API documentation with Doxygen:
cmake --build build --target apidoc
The generated HTML documentation is written to build/apidoc/html/index.html.