]> www.ginac.de Git - ginac.git/commit
build: CMake: made it easier to run tests in parallel
authorAlexey Sheplyakov <asheplyakov@altlinux.org>
Fri, 27 Dec 2019 13:34:05 +0000 (17:34 +0400)
committerAlexey Sheplyakov <asheplyakov@altlinux.org>
Fri, 28 Aug 2020 15:15:31 +0000 (19:15 +0400)
commit7704505fbf7d969ff918f8bf2ff9ed976194987a
treec7a4bebf32931bb29328b35159d487fd77322c49
parent51de097fb10f6167affe710328555113d7bcfa63
build: CMake: made it easier to run tests in parallel

As of now `make -jN check` executes test suite sequentially
(although it builds test executables in parallel). This takes
a bit too long, so it would be nice to run tests in parallel.
`ctest -jN` or `make test ARGS=-jN` runs tests concurrently,
however it does not build test executables, instead it fails
if any test binary is missing.

Also `test` target is a bit special and it's impossible to add
dependencies to it, see
https://gitlab.kitware.com/cmake/cmake/issues/8438

To work around the problem define `test_suite` target which
builds the tests suite without running it, so one can both
compile and run tests in parallel

make -j8 test_suite
make test ARGS=-j8
CMakeLists.txt
check/CMakeLists.txt