Installation

vary targets C++20 and builds with clang >= 14 or gcc >= 11. It depends only on the base polycpp library (and none).

Using a local clone

If you already have vary and polycpp checked out side by side, tell CMake to use them instead of fetching from GitHub:

# Building this repo directly
cmake -B build -G Ninja \
    -DPOLYCPP_SOURCE_DIR=/path/to/polycpp

# Consuming this repo through FetchContent
cmake -B build -G Ninja \
    -DFETCHCONTENT_SOURCE_DIR_POLYCPP=/path/to/polycpp \
    -DFETCHCONTENT_SOURCE_DIR_POLYCPP_VARY=/path/to/vary

This is the path local validation can use when testing a port beside a polycpp checkout - see tests/ in the repo. The generated CMake also uses /data/repo/polycpp automatically when that checkout exists.

Build options

POLYCPP_VARY_BUILD_TESTS

Build the GoogleTest suite. Defaults to ON for standalone builds and OFF when consumed via FetchContent.

POLYCPP_IO

asio (default) or libuv - inherited from polycpp.

POLYCPP_SSL_BACKEND

boringssl (default) or openssl.

POLYCPP_UNICODE

icu (recommended) or builtin. ICU enables the Intl surface that several polycpp headers pull into their public signatures.

Verifying the install

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build
ctest --test-dir build --output-on-failure

All tests should pass on a supported toolchain - if they do not, open an issue on the repository with the compiler version and the failing test name.