summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-01 15:22:31 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-01 15:22:31 (GMT)
commit22b3a1abd93742f551f99f655f57fcba81db0999 (patch)
tree67ebb6f2fd26424d4bd56fc3238e9c229c5761b9 /.gitlab
parent0519db374c79f654b55de396943cafcf36db695f (diff)
downloadCMake-22b3a1abd93742f551f99f655f57fcba81db0999.zip
CMake-22b3a1abd93742f551f99f655f57fcba81db0999.tar.gz
CMake-22b3a1abd93742f551f99f655f57fcba81db0999.tar.bz2
ci: support a max parallelism for test-ext jobs
Machines may have more cores than testing actually supports. Apply the change from commit e80362252f (ci: support a max parallelism for tests, 2020-09-28) to tests in the test-ext stage too.
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/ctest_test_external.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_test_external.cmake
index d92b936..4ea060d 100644
--- a/.gitlab/ci/ctest_test_external.cmake
+++ b/.gitlab/ci/ctest_test_external.cmake
@@ -33,6 +33,11 @@ endif ()
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 ()
if (CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-j${nproc}")