boostorg / describe

A C++14 reflection library
https://boost.org/libs/describe
67 stars 24 forks source link

How to build the tests? #30

Closed codimoc closed 1 year ago

codimoc commented 2 years ago

Hi I am interested in understanding this library for some possible extension to the enumerations utilities.

However I am struggling to build and run the tests with the cmake provided.

This is what I am doing: git clone .... into new directory describe cd describe mkdir build cd build cmake .. cmake --build .

No errors but the test are not built and the final build stage returns immediately.

What am I doing wrong? Thanks

pdimov commented 2 years ago

The tests don't work without the Boost superproject. You would have to clone it first

git clone -b develop --depth 1 https://github.com/boostorg/boost.git boost-root

then update the necessary submodules

cd boost-root
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py -u describe

and then configure, build and test using CMake

mkdir __build__ && cd __build__
cmake -DBOOST_INCLUDE_LIBRARIES=describe -DBUILD_TESTING=ON ..
cmake --build . --target tests
ctest --output-on-failure --no-tests=error

I see that that I haven't included CMake tests in my GHA CI, so maybe I need to do so.

codimoc commented 2 years ago

Super. Thx!