summaryrefslogtreecommitdiffstats
path: root/config/cmake/scripts/CTestScript.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/scripts/CTestScript.cmake')
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 43cd48d..f5c15be 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -158,7 +158,12 @@ endif ()
# Use multiple CPU cores to build
include (ProcessorCount)
ProcessorCount (N)
-if (NOT N EQUAL 0)
+if (NOT N EQUAL 0)
+ if (MAX_PROC_COUNT)
+ if (N GREATER MAX_PROC_COUNT)
+ set (N ${MAX_PROC_COUNT)
+ endif ()
+ endif ()
if (NOT WIN32)
set (CTEST_BUILD_FLAGS -j${N})
endif ()