Source
Source code lives on github here
To clone from git:
git clone https://github.com/rconybea/xo-alloc
Tested with gcc 13.3
Install
One-step Install
Install along with the rest of XO from xo-umbrella2 source
Minimal Install
To build+install just required dependencies:
xo-alloc uses several supporting libraries from the XO project:
xo-indentlog source (structured logging)
xo-cmake source (shared cmake macros)
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 remaining dependencie(s) in topological order:
xo-build --clone --configure --build --install xo-indentlog
xo-build --clone --configure --build --install xo-alloc
Directories under PREFIX will then contain:
PREFIX
+- bin
| +- xo-build
| +- xo-cmake-config
| \- xo-cmake-lcov-harness
+- include
| \- xo
| +- alloc/
| \- indentlog/
+- lib
| +- cmake
| | +- xo_alloc/
| | \- indentlog/
| +- 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-alloc 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_alloc CONFIG REQUIRED)
target_link_libraries(mytarget INTERFACE xo_alloc)