C++ library template.
- C++23 compiler and standard library
- Exception support
- Run-time type information (RTTI)
#include <kaycxx/library-template.hpp>
int main() {
return kaycxx::library_template::sum(1, 2);
}CMake users consume the installed package with:
find_package(kaycxx-library-template 1.0.0 CONFIG REQUIRED)
target_link_libraries(my-target PRIVATE kaycxx::library-template)Non-CMake users can use pkg-config:
c++ $(pkg-config --cflags kaycxx-library-template) -c main.cpp
c++ main.o $(pkg-config --libs kaycxx-library-template)cmake -B build
cmake --build buildA shared library is built by default. For a static build:
cmake -B build -D BUILD_SHARED_LIBS=OFF
cmake --build buildcmake --install build --prefix /tmp/rootIf no prefix is specified, CMake installs to /usr/local by default on Unix systems.
Run all tests:
cmake --build build --target testGenerate API documentation with Doxygen:
cmake --build build --target apidocThe generated HTML documentation is written to build/apidoc/html/index.html.