summaryrefslogtreecommitdiffstats
path: root/bin/cmakehdf5
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cmakehdf5')
-rwxr-xr-xbin/cmakehdf519
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index c024ad1..2480497 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -70,6 +70,7 @@ set (CTEST_SOURCE_DIRECTORY "../hdf5")
set (CTEST_BINARY_DIRECTORY ".")
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
set (CTEST_BUILD_CONFIGURATION "Release")
+set (CTEST_MAX_N 8)
# -- CDash variables
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
@@ -87,6 +88,9 @@ set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_A
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
+ if(N GREATER ${CTEST_MAX_N})
+ set(N ${CTEST_MAX_N})
+ endif(N GREATER ${CTEST_MAX_N})
set(CTEST_BUILD_FLAGS -j${N})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
@@ -188,22 +192,31 @@ CTEST_START (${MODEL} TRACK ${MODEL})
if (NOT LOCAL_SKIP_UPDATE)
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
endif (NOT LOCAL_SKIP_UPDATE)
-CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Configure FAILED")
+endif()
message ("Configure DONE")
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Update Configure Notes)
endif (NOT LOCAL_NO_SUBMIT)
-CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Build)
endif (NOT LOCAL_NO_SUBMIT)
+if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Build FAILED")
+endif()
message ("build DONE")
if (NOT LOCAL_SKIP_TEST)
- CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if (NOT LOCAL_NO_SUBMIT)
CTEST_SUBMIT (PARTS Test)
endif (NOT LOCAL_NO_SUBMIT)
+ if(NOT res STREQUAL "0")
+ message (FATAL_ERROR "Test FAILED")
+ endif()
message ("test DONE")
endif (NOT LOCAL_SKIP_TEST)