From 96e50d0a6b5d93b4b58e6607349b8e91b8e399fc Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 18 Apr 2024 17:19:29 -0400 Subject: [PATCH] xo-ratio: README elaboration --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf8b2de2..2ed3e4e5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ Relative to `std::ratio`: 3. Provides concept support (with c++20) 4. Requires modern (c++17) support to achieve this +Relative to `boost::ratio`: +1. Streamlined, assumes modern compiler support + ## Getting Started ### install dependencies @@ -18,11 +21,45 @@ Relative to `std::ratio`: - [github/Rconybea/xo-cmake](https://github.com/Rconybea/xo-cmake) cmake macros - [github/Rconybea/xo-flatstring](https://github.com/Rconybea/xo-flatstring) fixed-capacity strings +### clone xo-ratio + +``` +$ cd ~/proj # for example +$ git clone https://github.com/Rconybea/xo-ratio +``` + ### build + install ``` $ cd xo-ratio $ PREFIX=/usr/local # for example $ BUILDDIR=.build # for example $ make ${BUILDDIR} -$ cmake -DCMAKE_PREFIX_PATH=${PREFIX} -B ${BUILDDIR} +$ cmake --build .build +$ cmake --install .build +``` + +### build with unit test coverage +``` +$ cd xo-ratio +$ mkdir .build-ccov +$ cmake -DCMAKE_BUILD_TYPE=coverage -B .build-ccov +$ cmake --build .build-ccov +``` + +run coverage-enabled unit tests +``` +$ cmake --build .build-ccov -- test +``` + +generate html+text coverage report +``` +$ cmake --build .build-ccov -- ccov +``` + +browse to `.build-ccov/ccov/html/index.html` + +### LSP support +``` +$ cd xo-ratio +$ ln -s .build/compile_commands.json ```