My utility library for C++20 made for personal use and learning purposes.
- Multiple-platform support: Both Windows and Linux are supported
- Static/Dynamic compilation: The library can be compiled as a static or dynamic library
- Documentation: Every module is documented with Doxygen style comments
- print.hpp: A print function with multiple overloads that supports various log levels, ("{} {}", {"formatted", "strings"}), colored [HEADERS] and source location @ README.md:16
- types.hpp: A set of type aliases
- debug.hpp: A constexpr constant that is enabled when the compiler is in debug mode
You can see example usage in tst\CMakeLists.txt
- CMake
- C++20
- Clone the repository
git clone https://github.com/Moztanku/JacLib.git path/to/JacLib- Include the library in your CMake project
# Note: Change your_target to your actual target name
add_subdirectory(path/to/JacLib)
target_link_libraries(your_target PRIVATE JacLib)
# On Windows it may be necessary to move compiled dlls to the executable directory
if (MSVC AND BUILD_SHARED_LIBS)
add_custom_command(
TARGET your_target POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:JacLib>"
"$<TARGET_FILE_DIR:your_target>")
endif()- Include the library in your source files
#include "jac/print.hpp"
int main() {
jac::print("{} {}!", {"Hello", "World"});
return 0;
}- CMake
- C++20
- Gtest
- Clone the repository
git clone https://github.com/Moztanku/JacLib.git path/to/JacLib- Build the project and tests
# Enter the repository directory
cd path/to/JacLib
# Configure step
cmake -B build -S . -DJacLib_BUILD_TESTS=ON
# Build step
cmake --build build- Run the tests
# Linux
./build/tst/JacLib_tests
# Windows
./build/tst/{Debug|Release}/JacLib_tests.exe- JacLib_BUILD_TESTS={ON|OFF}: Build the tests (default: OFF)
- BUILD_SHARED_LIBS={ON|OFF}: Build the library as a shared library (default: ON)
- CMAKE_BUILD_TYPE={Release|Debug}: Build type on Linux (default: Release)
- --config {Release|Debug}: Build type, set during build step on Windows (default: Release)