Source

Souce code lives on github here

To clone from git:

git clone https://github.com/rconybea/xo-tokenizer

Tested with gcc 13.3

Install

xo-tokenizer uses supporting library xo-ppsink and cmake macros xo-cmake. These are on github:

Installing from source

Install scripts for xo-tokenizer and xo-ppsink depend on helper scripts installed from xo-cmake.

Preamble:

mkdir -p ~/proj/xo
cd ~/proj/xo

git clone https://github.com/rconybea/xo-cmake

PREFIX=/usr/local  # ..or desired installation prefix

# want PREFIX/bin in PATH to use xo-cmake helpers
PATH=$PREFIX/bin:$PATH

Install xo-cmake:

cmake -B xo-cmake/.build -S xo-cmake
cmake --build xo-cmake/.build -j    # placeholder, can omit for now
cmake --install xo-cmake/.build

Install xo-ppsink:

xo-build --clone --configure --build --install xo-ppsink

Install xo-tokenizer:

xo-build --clone --configure --build --install xo-tokenizer

Directories under PREFIX will then contain:

PREFIX
+- bin
|  +- xo-build
|  +- xo-cmake-config
|  \- xo-cmake-lcov-harness
+- include
|  \- xo
|     +- ppsink/
|     \- tokenizer/
+- lib
|  \- cmake
|     +- xo_ppsink/
|     \- xo_tokenizer/
+- share
   \- cmake
      \- xo_macros
         +- Doxyfile.in
         +- gen-ccov.in
         \- xo-bootstrap-macros.cmake

Use CMake Support

To use built-in cmake suport, when using xo-tokenizer from another project:

Make sure PREFIX/lib/cmake is searched by cmake (if necessary, include it in CMAKE_PREFIX_PATH)

Add to CMakeLists.txt:

FindPackage(xo_tokenizer CONFIG REQUIRED)

target_link_libraries(mytarget INTERFACE xo_tokenizer)