Nightly CMake Build Multiple Tests at Once

Hello all,

I am trying to run the CMake nightly build using the scripts provided from the CMake website, https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst. After reading over cmake_common.cmake it seems like to me that if I add set(CTEST_BUILD_FLAGS "-j6") then when it is running the tests it should run 6 tests at the same time. When I add this line to my my_dashboard.cmake file it causes my build to fail to compile but if I remove the line then a full nightly build will succeed and post to the CMake CDash board. I am not sure what I am doing wrong and why adding this line causes the build to fail to compile.

Any suggestions would be appreciated.

Matt

CTEST_BUILD_FLAGS is for flags to the make tool during the build step. To run tests in parallel, see the PARALLEL_LEVEL option to the ctest_test command. In the cmake_common.cmake script, there are comments at the top about variables that can be set to control such arguments. See the CTEST_TEST_ARGS argument. It happens to document PARALLEL_LEVEL as an example. So:

set(CTEST_TEST_ARGS PARALLEL_LEVEL 6)

That helped thank you very much.