Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-05-29 17:18:51


Edward Diener wrote:
> I can figure that part of it out, but now the big question:
>
> What do I do to run the tests with CMake and where do I see the output to
> verify that any changes I make to the CMakeLists.txt in a test directory is
> correct ?

>From the Boost root:

mkdir __build
cd __build
cmake -DBOOST_ENABLE_CMAKE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DBUILD_TESTING=ON ..
cmake --build .
ctest --output-on-failure

If on Windows,

ctest --output-on-failure -C Debug

(or Release.)

For Preprocessor, the `cmake --build .` line won't do anything, but it's
needed for other libraries.

E.g. https://github.com/boostorg/assert/blob/6047fd69d39a81c4296ba27ee09f22dd0f7671f8/.travis.yml#L323-L328
and https://travis-ci.org/github/boostorg/assert/jobs/771973215


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk