Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-11-28 14:41:46


Andrey Semashev wrote:
> CMake is not used to run the library tests. Library testing is done
> exclusively with b2. Hence test/CMakeLists.txt is intentionally missing
> and add_subdirectory(test) is skipped.

It's useful nowadays to have a working test/CMakeLists.txt, because
more and more people use CMake for evaluating and testing Boost
libraries, and expect the procedure described at

https://github.com/boostorg/cmake#testing-boost-with-cmake

to work.

Even though the test/Jamfile for Scope isn't of the trivial form supported
by boost_test_jamfile, porting it isn't hard, and I've done so:

https://github.com/pdimov/scope/blob/feature/test-cml/test/CMakeLists.txt

People who would want to use CMake to run the tests should place
this CMakeLists.txt file in the libs/scope/test/ directory.

This is not a 100% port because it doesn't contain the header check part,
but it's good enough and significantly better than nothing.

At some point we should probably add having CMake-invocable tests
as a library requirement. But I probably need to finish the documentation
on how to do that, first.


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