summaryrefslogtreecommitdiffstats
path: root/config/cmake/CTestScript.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/CTestScript.cmake')
-rw-r--r--config/cmake/CTestScript.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index a5527c3..e819e58 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -101,6 +101,11 @@ endif ()
include (ProcessorCount)
ProcessorCount (N)
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 ()