summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/ctest_standalone.cmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/.gitlab/ci/ctest_standalone.cmake b/.gitlab/ci/ctest_standalone.cmake
index 48e910b..cec2de2 100644
--- a/.gitlab/ci/ctest_standalone.cmake
+++ b/.gitlab/ci/ctest_standalone.cmake
@@ -6,6 +6,14 @@ include("${CMAKE_CURRENT_LIST_DIR}/env_$ENV{CMAKE_CONFIGURATION}.cmake" OPTIONAL
set(cmake_args
-C "${CMAKE_CURRENT_LIST_DIR}/configure_$ENV{CMAKE_CONFIGURATION}.cmake")
+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 ()
+
# Create an entry in CDash.
ctest_start("${ctest_model}" GROUP "${ctest_group}")
@@ -33,14 +41,6 @@ if (configure_result)
"Failed to configure")
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} -l${nproc}")
elseif (CTEST_CMAKE_GENERATOR MATCHES "Ninja")