diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
commit | 13693b307c08f962d5416316b1c154bb0058529a (patch) | |
tree | 58b31c633ccd8181d94c0cc8ae9dfee8d7098561 /bin/cmakehdf5 | |
parent | bf473b40f57317fa60640f44c735133f58023f6a (diff) | |
download | hdf5-13693b307c08f962d5416316b1c154bb0058529a.zip hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.gz hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.bz2 |
[svn-r23211] Merge trunk CMake changes for minimum cmake version of 2.8.10. This was prompted by HDFFV-8227, OS X requires latest version of cmake for proper support.
Tested: local linux
Diffstat (limited to 'bin/cmakehdf5')
-rwxr-xr-x | bin/cmakehdf5 | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 4627828..c024ad1 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -19,9 +19,32 @@ $DPRINT $cfgfile # Remove temporary generated files if exit 0 trap "rm -f $cminfile $cfgfile" 0 +#============= +# Function definitions +#============= +TIMESTAMP() +{ + echo "=====" "`date`" "=====" +} + + #========== # main #========== +# Show a start time stamp +TIMESTAMP + +# Explain what and where log files are. +cat <<EOF +ctest.log: output of ctest script. +Log files will be stored in Testing/Temporary: + LastConfigure_<timestamp>.log: output of configure + LastBuild_<timestamp>.log: output of build + LastTest_<timestamp>.log: output of testing + LastTestsFailed_<timestamp>.log: list of failed tests + +EOF + # First generate the two needed input files, the $cimnfile and $cfgfile. # Then use ctest to use the two input files. @@ -35,7 +58,7 @@ trap "rm -f $cminfile $cfgfile" 0 #========== #========== cat > $cfgfile <<'EOF' -cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org @@ -49,7 +72,7 @@ set (CTEST_CMAKE_GENERATOR "Unix Makefiles") set (CTEST_BUILD_CONFIGURATION "Release") # -- CDash variables -#set (LOCAL_NO_SUBMIT TRUE) +set (LOCAL_NO_SUBMIT TRUE) # No CDash submit. set (MODEL "Experimental") set (CDASH_LOCAL TRUE) set (SITE_BUILDNAME_SUFFIX "SHARED") @@ -61,7 +84,12 @@ set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8") set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") # Use multiple CPU cores to build -SET (CTEST_BUILD_FLAGS "-j4") +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + set(CTEST_BUILD_FLAGS -j${N}) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() # ----------------------------------------------------------- # -- Get environment @@ -184,13 +212,12 @@ EOF # Run ctest -date -ctest -S $cfgfile -C Release -O testhdf.log +ctest -S $cfgfile -C Release -O ctest.log exit_code=$? if [ $exit_code = 0 ]; then echo Complete without error else echo Error encountered fi -date +TIMESTAMP exit $exit_code |