- Language: C++ (C++14 and C++20)
- Build Systems: CMake and Bazel
- Tools:
uv(for Python virtual environments),pre-commit,clang-format(v17), GitHub Actions for CI.
This repository uses the Python pre-commit library to manage git hooks run as
part of the commit process.
Install the uv tool if you don't have it already:
https://docs.astral.sh/uv/getting-started/installation.
Install pre-commit as a pre-commit hook:
uv run pre-commit installTests can be built and run using either CMake or Bazel. Both build systems are kept in sync manually.
To build and test using CMake via the provided script:
./scripts/cmake.shOr manually:
mkdir build
cmake --list-presets
cmake --preset <preset>
cmake --build --preset <preset>
ctest --preset <preset>To build and test using Bazel via the provided script:
./scripts/bazel.shOr manually:
bazel build //...
bazel test //...To use the value types code in your own CMake project, use FetchContent:
FetchContent_Declare(
value_types
GIT_REPOSITORY https://github.com/jbcoe/value_types
)
FetchContent_MakeAvailable(value_types)
target_link_libraries(my_program PUBLIC value_types::value_types)-
Build Systems Synchronization: Both CMake and Bazel are used as primary build systems. Whenever adding new targets or files, they must be manually added to both
CMakeLists.txtandBUILD.bazel. -
Code Formatting: Code is formatted using
clang-format(v17). This is enforced by GitHub actions andpre-commithooks. -
Testing: All changes must have test coverage. Both CMake and Bazel builds and tests must pass after any change.