Source

Source code lives on github here

To clone from git:

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

Tested with gcc 13.3

Install

One-step Install

Install along with the rest of XO from xo-umbrella2 source: see install instructions for xo-umrbella2

Essential Xo Dependencies

xo-reader uses several supporting libraries from the XO project:

Building from source

Install scripts for XO libraries 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 --install xo-cmake/.build

Install dependencies in topological order:

xo-build --clone --configure --build --install xo-indentlog
xo-build --clone --configure --build --install xo-subsys
xo-build --clone --configure --build --install xo-refcnt
xo-build --clone --configure --build --install xo-reflect
xo-build --clone --configure --build --install xo-expression
xo-build --clone --configure --build --install xo-tokenizer
xo-build --clone --configure --build --install xo-reader

Directories under PREFIX will then contain:

PREFIX
+- bin
|  +- xo-build
|  +- xo-cmake-config
|  \- xo-cmake-lcov-harness
+- include
|  \- xo
|     +- cxxutil/
|     +- expression/
|     +- indentlog/
|     +- reader/
|     +- refcnt/
|     +- reflect/
|     +- subsys/
|     \- tokenizer/
+- lib
|  +- cmake
|  |  +- indentlog/
|  |  +- refcnt/
|  |  +- reflect/
|  |  +- subsys/
|  |  +- xo_expression/
|  |  +- xo_reader/
|  |  \- xo_tokenizer/
|  +- lib*.so
+- share
   +- cmake
   |  \- xo_macros
   |     +- code-coverage.cmake
   |     +- xo-project-macros.cmake
   |     \- xo_cxx.cmake
   +- etc
   |  \- xo
   |     \- subsystem-list
   \- xo-macros
      +- Doxyfile.in
      +- gen-ccov.in
      \- xo-bootstrap-macros.cmake

CMake Support

To use built-in cmake support, when using xo-reader from another project:

Make sure PREFIX/lib/cmake is searched by cmake (for example include it in CMAKE_PREFIX_PATH)

Add to your CMakeLists.txt:

FindPackage(xo_reader CONFIG REQUIRED)
target_link_libraries(mytarget INTERFACE xo_reader)