diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-11-03 21:32:04 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-11-03 21:32:04 (GMT) |
commit | 31eac031c3e15220bfc8d3af2f7de707d381a036 (patch) | |
tree | 3a794e973d3fb4b94530ac1e966e618a62ca2612 /config | |
parent | bf4bcaeb675dc7994d186e23e54d997afbc0207a (diff) | |
download | hdf5-31eac031c3e15220bfc8d3af2f7de707d381a036.zip hdf5-31eac031c3e15220bfc8d3af2f7de707d381a036.tar.gz hdf5-31eac031c3e15220bfc8d3af2f7de707d381a036.tar.bz2 |
Updated optional CMake scripts
Diffstat (limited to 'config')
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 44 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF518config.cmake | 27 |
2 files changed, 38 insertions, 33 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index a056cfb..75e61ee 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -41,7 +41,7 @@ else(NOT SITE_OS_NAME) set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
endif()
if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX})
+ set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif(NOT SITE_OS_NAME)
@@ -98,15 +98,15 @@ else(CTEST_USE_TAR_SOURCE) set(NEED_REPOSITORY_CHECKOUT 1)
endif()
- if(${NEED_REPOSITORY_CHECKOUT})
+ if(${NEED_REPOSITORY_CHECKOUT})
if(REPOSITORY_BRANCH)
- set(GITUpdateOptions "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
else()
- set(GITUpdateOptions "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
endif()
- set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${GITUpdateOptions}")
+ set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
else()
- set(GITUpdateOptions "pull")
+ set(CTEST_GIT_options "pull")
endif()
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
else(CTEST_USE_GIT_SOURCE)
@@ -134,12 +134,12 @@ else(CTEST_USE_TAR_SOURCE) endif()
if(${NEED_REPOSITORY_CHECKOUT})
set(CTEST_CHECKOUT_COMMAND
- "${CTEST_SVN_COMMAND} co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
- else(${NEED_REPOSITORY_CHECKOUT})
+ "\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
+ else()
if(CTEST_REPO_VERSION)
set(CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
endif()
- endif(${NEED_REPOSITORY_CHECKOUT})
+ endif()
endif(CTEST_USE_GIT_SOURCE)
endif(LOCAL_UPDATE)
endif(CTEST_USE_TAR_SOURCE)
@@ -191,14 +191,14 @@ endforeach(req) if(LOCAL_MEMCHECK_TEST)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
else()
if(LOCAL_COVERAGE_TEST)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
endif()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
endif()
@@ -240,20 +240,20 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- if(${res} LESS 0 OR ${res} GREATER 0)
- message(FATAL_ERROR "Failed configure: ${res}\n")
- endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif()
+ if(${res} LESS 0 OR ${res} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+ endif()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
- if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
- message(FATAL_ERROR "Failed build: ${res} with Errors=${errval}\n")
- endif()
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
+ if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+ endif()
if(NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
@@ -262,13 +262,13 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") ctest_submit (PARTS Test)
endif()
if(${res} LESS 0 OR ${res} GREATER 0)
- message(FATAL_ERROR "Failed tests: ${res}\n")
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
endif()
else()
ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
if(LOCAL_SUBMIT)
ctest_submit (PARTS MemCheck)
- endif(LOCAL_SUBMIT)
+ endif()
endif()
if(LOCAL_COVERAGE_TEST)
ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
@@ -278,7 +278,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") endif()
endif(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
+ if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
@@ -290,7 +290,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") )
file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
if(cpackResult GREATER 0)
- message (FATAL_ERROR "Failed packaging: ${cpackResult}\n")
+ file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
endif()
- endif(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
+ endif()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF518config.cmake b/config/cmake/scripts/HDF518config.cmake index 5cc73cf..55e4667 100755 --- a/config/cmake/scripts/HDF518config.cmake +++ b/config/cmake/scripts/HDF518config.cmake @@ -19,21 +19,21 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) # VS201264 * Visual Studio 11 2012 Win64
#
# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
# CTEST_SOURCE_NAME - source folder
# STATIC_LIBRARIES - Build/use static libraries
# FORTRAN_LIBRARIES - Build/use fortran libraries
# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
##############################################################################
-set(CTEST_SOURCE_VERSION 1.8.16)
+set(CTEST_SOURCE_VERSION 1.8.18)
set(CTEST_SOURCE_VERSEXT "")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.16
#STATIC_LIBRARIES - Default is YES
#FORTRAN_LIBRARIES - Default is NO
@@ -52,7 +52,7 @@ endif() # build generator must be defined
if(NOT DEFINED BUILD_GENERATOR)
- message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2013, VS201364, VS2012, or VS201264")
+ message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
else()
if(${BUILD_GENERATOR} STREQUAL "Unix")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
@@ -69,28 +69,32 @@ else() elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
else()
- message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2013, VS201364, VS2012, or VS201264")
+ message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
endif()
endif()
if(NOT DEFINED INSTALLDIR)
if(WIN32)
- set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
+ set(INSTALLDIR "C:\\Program\ Files\\HDF_Group\\HDF5\\${CTEST_SOURCE_VERSION}")
else()
- set(INSTALLDIR "/usr/local/myhdf5")
+ set(INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
endif()
endif()
-if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
- set(CTEST_BUILD_CONFIGURATION "Release")
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
endif()
if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
+else()
+ set(STATICLIBRARIES "NO")
endif()
if(NOT DEFINED FORTRAN_LIBRARIES)
set(FORTRANLIBRARIES "NO")
+else()
+ set(FORTRANLIBRARIES "YES")
endif()
set(CTEST_BINARY_NAME "build")
@@ -162,7 +166,7 @@ set(MODEL "Experimental") #set(LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8_16")
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8_18")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
###################################################################
@@ -214,7 +218,8 @@ endif() set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
### change install prefix
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH='${INSTALLDIR}'")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
###################################################################
|