summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-11-19 16:02:40 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-11-19 16:03:18 (GMT)
commita26aedce040dc8fc04e7d839b17f50480d9ec524 (patch)
tree453b302aa87ebdf1ffab43f8231a43f55fd0a2c4
parente9125d6a9960a588244998e959598a27d3c8d352 (diff)
downloadhdf5-a26aedce040dc8fc04e7d839b17f50480d9ec524.zip
hdf5-a26aedce040dc8fc04e7d839b17f50480d9ec524.tar.gz
hdf5-a26aedce040dc8fc04e7d839b17f50480d9ec524.tar.bz2
Check PARALLEL_LEVEL maximum
-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 ()