mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
ci: support a max parallelism for tests
Machines may have more cores than testing actually supports.
This commit is contained in:
@@ -10,6 +10,11 @@ ctest_start(APPEND)
|
||||
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(nproc)
|
||||
if (NOT "$ENV{CTEST_MAX_PARALLELISM}" STREQUAL "")
|
||||
if (nproc GREATER "$ENV{CTEST_MAX_PARALLELISM}")
|
||||
set(nproc "$ENV{CTEST_MAX_PARALLELISM}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
|
||||
ctest_test(
|
||||
|
||||
Reference in New Issue
Block a user