diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-03-01 20:47:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-03-01 20:47:53 (GMT) |
commit | 2562ec3a4b5ee4cff25e182bf0a29795673ca83d (patch) | |
tree | be9f99660f7ff660df6199623b0c556f83c446a1 /config | |
parent | 038359746351249d6023e023f446b2bc612822b6 (diff) | |
download | hdf5-2562ec3a4b5ee4cff25e182bf0a29795673ca83d.zip hdf5-2562ec3a4b5ee4cff25e182bf0a29795673ca83d.tar.gz hdf5-2562ec3a4b5ee4cff25e182bf0a29795673ca83d.tar.bz2 |
Update CMake files and formatting
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/CMakeFindJavaCommon.cmake | 14 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 26 | ||||
-rw-r--r-- | config/cmake/FindJNI.cmake | 2 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 64 | ||||
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 28 | ||||
-rw-r--r-- | config/cmake/HDF5_Examples.cmake.in | 70 | ||||
-rw-r--r-- | config/cmake/UseJava.cmake | 2 | ||||
-rw-r--r-- | config/cmake/UserMacros/Windows_MT.cmake | 4 | ||||
-rw-r--r-- | config/cmake/hdf5-config-version.cmake.in | 8 | ||||
-rw-r--r-- | config/cmake/hdf5-config.cmake.in | 2 | ||||
-rw-r--r-- | config/cmake/jrunTest.cmake | 6 | ||||
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 336 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5config.cmake | 94 | ||||
-rw-r--r-- | config/cmake/vfdTest.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/CheckTypeSize.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 20 | ||||
-rw-r--r-- | config/cmake_ext_mod/FindMPI.cmake | 6 | ||||
-rw-r--r-- | config/cmake_ext_mod/FindSZIP.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFUseFortran.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 18 |
20 files changed, 361 insertions, 355 deletions
diff --git a/config/cmake/CMakeFindJavaCommon.cmake b/config/cmake/CMakeFindJavaCommon.cmake index fcf0389..fe6ee82 100644 --- a/config/cmake/CMakeFindJavaCommon.cmake +++ b/config/cmake/CMakeFindJavaCommon.cmake @@ -17,25 +17,25 @@ set(_JAVA_HOME "") if(JAVA_HOME AND IS_DIRECTORY "${JAVA_HOME}") set(_JAVA_HOME "${JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 1) -else() +else () set(_ENV_JAVA_HOME "") if(DEFINED ENV{JAVA_HOME}) file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _ENV_JAVA_HOME) - endif() + endif () if(_ENV_JAVA_HOME AND IS_DIRECTORY "${_ENV_JAVA_HOME}") set(_JAVA_HOME "${_ENV_JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 1) - else() + else () set(_CMD_JAVA_HOME "") if(APPLE AND EXISTS /usr/libexec/java_home) execute_process(COMMAND /usr/libexec/java_home OUTPUT_VARIABLE _CMD_JAVA_HOME OUTPUT_STRIP_TRAILING_WHITESPACE) - endif() + endif () if(_CMD_JAVA_HOME AND IS_DIRECTORY "${_CMD_JAVA_HOME}") set(_JAVA_HOME "${_CMD_JAVA_HOME}") set(_JAVA_HOME_EXPLICIT 0) - endif() + endif () unset(_CMD_JAVA_HOME) - endif() + endif () unset(_ENV_JAVA_HOME) -endif() +endif () diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 1745e6c..a417806 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -101,9 +101,9 @@ CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME) # Find the library containing clock_gettime() if (NOT WINDOWS) - CHECK_FUNCTION_EXISTS(clock_gettime CLOCK_GETTIME_IN_LIBC) - CHECK_LIBRARY_EXISTS(rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT) - CHECK_LIBRARY_EXISTS(posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4) + CHECK_FUNCTION_EXISTS (clock_gettime CLOCK_GETTIME_IN_LIBC) + CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT) + CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4) if (CLOCK_GETTIME_IN_LIBC) set (H5_HAVE_CLOCK_GETTIME 1) elseif (CLOCK_GETTIME_IN_LIBRT) @@ -142,7 +142,7 @@ if (NOT WINDOWS) "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () - else ( ) + else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log @@ -157,17 +157,17 @@ endif () #----------------------------------------------------------------------------- CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) -if(${HAVE_SIZEOF___FLOAT128}) - SET(H5_HAVE_FLOAT128 1) +if (${HAVE_SIZEOF___FLOAT128}) + SET (H5_HAVE_FLOAT128 1) else () - SET(H5_HAVE_FLOAT128 0) - SET(SIZEOF___FLOAT128 0) -endif() + SET (H5_HAVE_FLOAT128 0) + SET (SIZEOF___FLOAT128 0) +endif () #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities #----------------------------------------------------------------------------- -MACRO (H5ConversionTests TEST msg) +macro (H5ConversionTests TEST msg) if ("${TEST}" MATCHES "^${TEST}$") # message (STATUS "===> ${TEST}") TRY_RUN (${TEST}_RUN ${TEST}_COMPILE @@ -196,12 +196,12 @@ MACRO (H5ConversionTests TEST msg) endif () endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Macro to make some of the conversion tests easier to write/read #----------------------------------------------------------------------------- -MACRO (H5MiscConversionTest VAR TEST msg) +macro (H5MiscConversionTest VAR TEST msg) if ("${TEST}" MATCHES "^${TEST}$") if (${VAR}) set (${TEST} 1 CACHE INTERNAL ${msg}) @@ -211,7 +211,7 @@ MACRO (H5MiscConversionTest VAR TEST msg) message (STATUS "${msg}... no") endif () endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Check various conversion capabilities diff --git a/config/cmake/FindJNI.cmake b/config/cmake/FindJNI.cmake index 9d755fc..baab2ea 100644 --- a/config/cmake/FindJNI.cmake +++ b/config/cmake/FindJNI.cmake @@ -147,8 +147,6 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES /usr/lib/jvm/java-1.5.0-sun/jre/lib/{libarch} /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/{libarch} # can this one be removed according to #8821 ? Alex /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch} - /usr/lib/jvm/java-7-openjdk/jre/lib/{libarch} - /usr/lib/jvm/java-7-openjdk-{libarch}/jre/lib/{libarch} /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/{libarch} # fedora # Debian specific paths for default JVM /usr/lib/jvm/default-java/jre/lib/{libarch} diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 4d86cf9..6aa5e1f 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -23,45 +23,45 @@ if(DEFINED CTEST_SCRIPT_ARG) foreach(current_var ${script_args}) if ("${current_var}" MATCHES "^([^=]+)=(.+)$") set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - endforeach() -endif() + endif () + endforeach () +endif () if(NOT DEFINED INSTALLDIR) set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif() +endif () if(NOT DEFINED CTEST_CONFIGURATION_TYPE) set(CTEST_CONFIGURATION_TYPE "Release") -endif() +endif () if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") -endif() +endif () if(NOT DEFINED STATIC_ONLY) set(STATICONLYLIBRARIES "YES") else(NOT DEFINED STATIC_ONLY) set(STATICONLYLIBRARIES "NO") -endif() +endif () if(NOT DEFINED FORTRAN_LIBRARIES) set(FORTRANLIBRARIES "NO") else(NOT DEFINED FORTRAN_LIBRARIES) set(FORTRANLIBRARIES "YES") -endif() +endif () if(NOT DEFINED HDF_LOCAL) set(CDASH_LOCAL "NO") else(NOT HDF_LOCAL) set(CDASH_LOCAL "YES") -endif() +endif () if(NOT DEFINED CTEST_SITE) set(CTEST_SITE "local") -endif() +endif () if(NOT DEFINED CTEST_BUILD_NAME) set(CTEST_BUILD_NAME "examples") -endif() +endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) # set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source") -#endif() +#endif () ############################################################################################################### # Adjust the following SET Commands as needed @@ -69,7 +69,7 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRI if(WIN32) if(${STATICONLYLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif() + endif () set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") @@ -77,7 +77,7 @@ if(WIN32) else(WIN32) if(${STATICONLYLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif() + endif () set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) @@ -86,12 +86,12 @@ else(WIN32) endif(WIN32) if(${FORTRANLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -else() +else () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -endif() +endif () if(${CDASH_LOCAL}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif() +endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### @@ -111,11 +111,11 @@ if(APPLE) if(NOT NO_MAC_FORTRAN) # Shared fortran is not supported, build static set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else() + else () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif() + endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif() +endif () #----------------------------------------------------------------------------- set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") @@ -126,16 +126,16 @@ if(CTEST_USE_TAR_SOURCE) if(WIN32) message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) - else() + else () message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) - endif() + endif () if(NOT rv EQUAL 0) message(STATUS "extracting... [error-(${rv}) clean up]") file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") - endif() + endif () endif(CTEST_USE_TAR_SOURCE) #----------------------------------------------------------------------------- @@ -154,9 +154,9 @@ ProcessorCount(N) if(NOT N EQUAL 0) if(NOT WIN32) set(CTEST_BUILD_FLAGS -j${N}) - endif() + endif () set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) -endif() +endif () set (CTEST_CONFIGURE_COMMAND "${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}\"" ) @@ -174,27 +174,27 @@ ctest_start (Experimental) ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) if(${res} LESS 0 OR ${res} GREATER 0) file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") -endif() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Configure Notes) -endif() +endif () ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval) 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() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Build) -endif() +endif () ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) if(${res} LESS 0 OR ${res} GREATER 0) file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") -endif() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Test) -endif() +endif () if(${res} LESS 0 OR ${res} GREATER 0) message (FATAL_ERROR "tests FAILED") -endif() +endif () #----------------------------------------------------------------------------- ############################################################################################################## message(STATUS "DONE")
\ No newline at end of file diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index e84bf74..5529d14 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -18,7 +18,7 @@ ENABLE_LANGUAGE (Fortran) # The provided CMake Fortran macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- -MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) +macro (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) # # if (NOT DEFINED ${RUN_RESULT_VAR}) message (STATUS "Detecting Fortran ${FUNCTION}") @@ -66,14 +66,14 @@ MACRO (FORTRAN_RUN FUNCTION CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN) endif () endif () # endif () -ENDMACRO () +endmacro () # Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END" -MACRO (READ_SOURCE START END RETURN) +macro (READ_SOURCE START END RETURN) file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" CODE) string (REGEX MATCH "${START}[\\\t\\\n\\\r[].+]*${END}" CODE ${CODE}) set (RETURN "${CODE}") -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Check to see C_LONG_DOUBLE is available @@ -120,8 +120,8 @@ endif () # Determine the available KINDs for REALs and INTEGERs #----------------------------------------------------------------------------- -READ_SOURCE("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" CODE) -FORTRAN_RUN("REAL and INTEGER KINDs" +READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" CODE) +FORTRAN_RUN ("REAL and INTEGER KINDs" "${CODE}" XX YY @@ -222,7 +222,7 @@ MATH (EXPR _LEN "${LEN_VAR}-1") list (GET VAR ${_LEN} max_real_fortran_kind) foreach (KIND ${VAR} ) - set(PROG_SRC + set (PROG_SRC " PROGRAM main USE ISO_C_BINDING @@ -232,7 +232,7 @@ foreach (KIND ${VAR} ) END " ) - FORTRAN_RUN("REAL KIND SIZEOF" ${PROG_SRC} + FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC} XX YY PROG_OUTPUT1 @@ -267,7 +267,7 @@ list (GET VAR ${_LEN} max_real_fortran_sizeof) #----------------------------------------------------------------------------- # Find sizeof of native kinds #----------------------------------------------------------------------------- -FORTRAN_RUN("SIZEOF NATIVE KINDs" +FORTRAN_RUN ("SIZEOF NATIVE KINDs" " PROGRAM main USE ISO_C_BINDING @@ -319,7 +319,7 @@ if (NOT PAC_FORTRAN_NATIVE_INTEGER_KIND) endif () if (NOT PAC_FORTRAN_NATIVE_REAL_KIND) message (FATAL_ERROR "Failed to find KIND of NATIVE REAL for Fortran") -endif() +endif () if (NOT PAC_FORTRAN_NATIVE_DOUBLE_KIND) message (FATAL_ERROR "Failed to find KIND of NATIVE DOUBLE for Fortran") endif () @@ -360,7 +360,7 @@ ENABLE_LANGUAGE (C) # The provided CMake C macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- -MACRO (C_RUN FUNCTION CODE RETURN) +macro (C_RUN FUNCTION CODE RETURN) message (STATUS "Detecting C ${FUNCTION}") if (CMAKE_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES @@ -405,7 +405,7 @@ MACRO (C_RUN FUNCTION CODE RETURN) else () message (FATAL_ERROR "Compilation of C ${FUNCTION} - Failed") endif () -ENDMACRO () +endmacro () set (PROG_SRC " @@ -434,9 +434,9 @@ set (PROG_SRC return 1\\\; } " - ) +) -C_RUN("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT) +C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT) # dnl The output from the above program will be: # dnl -- LINE 1 -- long double decimal precision diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index 24b79b2..c7665e3 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -24,50 +24,50 @@ if(DEFINED CTEST_SCRIPT_ARG) foreach(current_var ${script_args}) if ("${current_var}" MATCHES "^([^=]+)=(.+)$") set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - endforeach() -endif() + endif () + endforeach () +endif () if(NOT DEFINED INSTALLDIR) set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif() +endif () if(NOT DEFINED CTEST_CONFIGURATION_TYPE) set(CTEST_CONFIGURATION_TYPE "Release") -endif() +endif () if(NOT DEFINED CTEST_SOURCE_NAME) set(CTEST_SOURCE_NAME "HDF5Examples") -endif() +endif () if(NOT DEFINED STATIC_ONLY) set(STATICONLYLIBRARIES "YES") else(NOT DEFINED STATIC_ONLY) set(STATICONLYLIBRARIES "NO") -endif() +endif () if(NOT DEFINED FORTRAN_LIBRARIES) set(FORTRANLIBRARIES "NO") else(NOT DEFINED FORTRAN_LIBRARIES) set(FORTRANLIBRARIES "YES") -endif() +endif () if(NOT DEFINED JAVA_LIBRARIES) set(JAVALIBRARIES "NO") else(NOT DEFINED JAVA_LIBRARIES) set(JAVALIBRARIES "YES") -endif() +endif () if(NOT DEFINED HDF_LOCAL) set(CDASH_LOCAL "NO") else(NOT HDF_LOCAL) set(CDASH_LOCAL "YES") -endif() +endif () if(NOT DEFINED CTEST_SITE) set(CTEST_SITE "local") -endif() +endif () if(NOT DEFINED CTEST_BUILD_NAME) set(CTEST_BUILD_NAME "examples") -endif() +endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) # set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source") -#endif() +#endif () ############################################################################################################### # Adjust the following SET Commands as needed @@ -75,7 +75,7 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRI if(WIN32) if(${STATICONLYLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - endif() + endif () set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") @@ -83,7 +83,7 @@ if(WIN32) else(WIN32) if(${STATICONLYLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif() + endif () set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) @@ -92,17 +92,17 @@ else(WIN32) endif(WIN32) if(${FORTRANLIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -else() +else () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -endif() +endif () if(${JAVALIBRARIES}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") -else() +else () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF") -endif() +endif () if(${CDASH_LOCAL}) set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif() +endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### @@ -122,11 +122,11 @@ if(APPLE) if(NOT NO_MAC_FORTRAN) # Shared fortran is not supported, build static set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else() + else () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") - endif() + endif () set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif() +endif () #----------------------------------------------------------------------------- set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") @@ -137,16 +137,16 @@ if(CTEST_USE_TAR_SOURCE) if(WIN32) message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]") execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) - else() + else () message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]") execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) - endif() + endif () if(NOT rv EQUAL 0) message(STATUS "extracting... [error-(${rv}) clean up]") file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") - endif() + endif () endif(CTEST_USE_TAR_SOURCE) #----------------------------------------------------------------------------- @@ -165,9 +165,9 @@ ProcessorCount(N) if(NOT N EQUAL 0) if(NOT WIN32) set(CTEST_BUILD_FLAGS -j${N}) - endif() + endif () set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) -endif() +endif () set (CTEST_CONFIGURE_COMMAND "${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}\"" ) @@ -185,27 +185,27 @@ ctest_start (Experimental) ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) if(${res} LESS 0 OR ${res} GREATER 0) file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") -endif() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Configure Notes) -endif() +endif () ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval) 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() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Build) -endif() +endif () ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) if(${res} LESS 0 OR ${res} GREATER 0) file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") -endif() +endif () if(LOCAL_SUBMIT) ctest_submit (PARTS Test) -endif() +endif () if(${res} LESS 0 OR ${res} GREATER 0) message (FATAL_ERROR "tests FAILED") -endif() +endif () #----------------------------------------------------------------------------- ############################################################################################################## message(STATUS "DONE")
\ No newline at end of file diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake index 6391c63..3e74d4f 100644 --- a/config/cmake/UseJava.cmake +++ b/config/cmake/UseJava.cmake @@ -1250,7 +1250,7 @@ function(create_javadoc _target) else () set(_overview ${_overview}:${_path}) endif () - endforeach() + endforeach () set(_javadoc_options ${_javadoc_options} -overview ${_overview}) endif () diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake index d30d4d5..216a014 100644 --- a/config/cmake/UserMacros/Windows_MT.cmake +++ b/config/cmake/UserMacros/Windows_MT.cmake @@ -10,7 +10,7 @@ #----------------------------------------------------------------------------- # Option to Build with Static CRT libraries on Windows #------------------------------------------------------------------------------- -MACRO (TARGET_STATIC_CRT_FLAGS) +macro (TARGET_STATIC_CRT_FLAGS) if (MSVC AND NOT BUILD_SHARED_LIBS) foreach (flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE @@ -31,7 +31,7 @@ MACRO (TARGET_STATIC_CRT_FLAGS) set (WIN_COMPILE_FLAGS "") set (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT") endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- option (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF) diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in index 45a832e..ad1b96d 100644 --- a/config/cmake/hdf5-config-version.cmake.in +++ b/config/cmake/hdf5-config-version.cmake.in @@ -12,7 +12,7 @@ set (PACKAGE_VERSION "@HDF5_VERSION_STRING@") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() +else () if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@") # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@ @@ -32,16 +32,16 @@ else() set (PACKAGE_VERSION_COMPATIBLE FALSE) endif () endif () -endif() +endif () # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") return() -endif() +endif () # check that the installed version has the same 32/64bit-ness as the one which is currently searching: if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() +endif () diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 41fc726..6dffa6c 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -50,7 +50,7 @@ if (${HDF5_PACKAGE_NAME}_BUILD_JAVA) ) set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARY "@PACKAGE_CURRENT_BUILD_DIR@/lib") set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARIES "${${HDF5_PACKAGE_NAME}_JAVA_LIBRARY}") -endif() +endif () #----------------------------------------------------------------------------- # Directories diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 2d83caf..0e0106f 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -126,7 +126,7 @@ if (NOT TEST_SKIP_COMPARE) file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) list (LENGTH test_ref len_ref) if (NOT ${len_act} STREQUAL "0") - MATH (EXPR _FP_LEN "${len_ref} - 1") + math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) list (GET test_ref ${line} str_ref) @@ -168,9 +168,9 @@ if (NOT TEST_SKIP_COMPARE) list (LENGTH test_act len_act) file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) list (LENGTH test_ref len_ref) - MATH (EXPR _FP_LEN "${len_ref} - 1") + math (EXPR _FP_LEN "${len_ref} - 1") if (NOT ${len_act} STREQUAL "0") - MATH (EXPR _FP_LEN "${len_ref} - 1") + math (EXPR _FP_LEN "${len_ref} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET test_act ${line} str_act) list (GET test_ref ${line} str_ref) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index e525078..dca9631 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -7,163 +7,163 @@ cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) # -----------------------------------------------------------
# -- Get environment
# -----------------------------------------------------------
-if(NOT SITE_OS_NAME)
+if (NOT SITE_OS_NAME)
## machine name not provided - attempt to discover with uname
## -- set hostname
## --------------------------
- find_program(HOSTNAME_CMD NAMES hostname)
- exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
- set(CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
- find_program(UNAME NAMES uname)
- macro(getuname name flag)
- exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
- endmacro(getuname)
+ find_program (HOSTNAME_CMD NAMES hostname)
+ exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program (UNAME NAMES uname)
+ macro (getuname name flag)
+ exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro ()
- getuname(osname -s)
- getuname(osrel -r)
- getuname(cpu -m)
- message(STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+ getuname (osname -s)
+ getuname (osrel -r)
+ getuname (cpu -m)
+ message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
- set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
- endif()
- set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
-else()
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+ if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else ()
## machine name provided
## --------------------------
- if(CMAKE_HOST_UNIX)
+ if (CMAKE_HOST_UNIX)
set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
- else()
+ else ()
set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
- endif()
- if(SITE_BUILDNAME_SUFFIX)
+ endif ()
+ if (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()
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif ()
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
-if(APPLE)
+if (APPLE)
# Compiler choice
- execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(ENV{CC} "${XCODE_CC}")
- set(ENV{CXX} "${XCODE_CXX}")
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
- if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- endif()
+ if (NOT NO_MAC_FORTRAN)
+ # Shared fortran is not supported, build static
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ else ()
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ endif ()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif()
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
#-----------------------------------------------------------------------------
-set(NEED_REPOSITORY_CHECKOUT 0)
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-if(CTEST_USE_TAR_SOURCE)
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
## Uncompress source if tar file provided
## --------------------------
- if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif()
+ if (WIN32)
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else ()
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif ()
- if(NOT rv EQUAL 0)
- message(STATUS "extracting... [error-(${rv}) clean up]")
- file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message(FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
- endif()
+ if (NOT rv EQUAL 0)
+ message (STATUS "extracting... [error-(${rv}) clean up]")
+ file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+ endif ()
- file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
- set(LOCAL_SKIP_UPDATE "TRUE")
-else()
- if(LOCAL_UPDATE)
- if(CTEST_USE_GIT_SOURCE)
- find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
- set(CTEST_GIT_UPDATE_OPTIONS)
+ file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set (LOCAL_SKIP_UPDATE "TRUE")
+else ()
+ if (LOCAL_UPDATE)
+ if (CTEST_USE_GIT_SOURCE)
+ find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
+ set (CTEST_GIT_UPDATE_OPTIONS)
- if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set(NEED_REPOSITORY_CHECKOUT 1)
- endif()
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
- if(${NEED_REPOSITORY_CHECKOUT})
- if(REPOSITORY_BRANCH)
- set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- else()
- set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- endif()
- set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
- else()
- set(CTEST_GIT_options "pull")
- endif()
- set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
- else()
+ if (${NEED_REPOSITORY_CHECKOUT})
+ if (REPOSITORY_BRANCH)
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ else ()
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ endif ()
+ set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
+ else ()
+ set (CTEST_GIT_options "pull")
+ endif ()
+ set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+ else ()
## --------------------------
## use subversion to get source
#-----------------------------------------------------------------------------
## cygwin does not handle the find_package() call
## --------------------------
- set(CTEST_UPDATE_COMMAND "SVNCommand")
- if(NOT SITE_CYGWIN})
+ set (CTEST_UPDATE_COMMAND "SVNCommand")
+ if (NOT SITE_CYGWIN})
find_package (Subversion)
- set(CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
- set(CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
- else()
- set(CTEST_SVN_COMMAND "/usr/bin/svn")
- set(CTEST_UPDATE_COMMAND "/usr/bin/svn")
- endif()
+ set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ else ()
+ set (CTEST_SVN_COMMAND "/usr/bin/svn")
+ set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
+ endif ()
- if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set(NEED_REPOSITORY_CHECKOUT 1)
- endif()
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
- if(NOT CTEST_REPO_VERSION)
- set(CTEST_REPO_VERSION "HEAD")
- endif()
- if(${NEED_REPOSITORY_CHECKOUT})
- set(CTEST_CHECKOUT_COMMAND
+ if (NOT CTEST_REPO_VERSION)
+ set (CTEST_REPO_VERSION "HEAD")
+ endif ()
+ if (${NEED_REPOSITORY_CHECKOUT})
+ set (CTEST_CHECKOUT_COMMAND
"\"${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()
- endif()
- endif()
-endif()
+ else ()
+ if (CTEST_REPO_VERSION)
+ set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
+ endif ()
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
- file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-else()
- ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-endif()
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
+ file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
+ ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+endif ()
# Use multiple CPU cores to build
-include(ProcessorCount)
-ProcessorCount(N)
-if(NOT N EQUAL 0)
- if(NOT WIN32)
- set(CTEST_BUILD_FLAGS -j${N})
- endif()
- set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif()
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+ if (NOT WIN32)
+ set (CTEST_BUILD_FLAGS -j${N})
+ endif ()
+ set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
#-----------------------------------------------------------------------------
# Send the main script as a note.
-list(APPEND CTEST_NOTES_FILES
+list (APPEND CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
"${CMAKE_CURRENT_LIST_FILE}"
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
@@ -172,39 +172,39 @@ list(APPEND CTEST_NOTES_FILES #-----------------------------------------------------------------------------
# Check for required variables.
# --------------------------
-foreach(req
+foreach (req
CTEST_CMAKE_GENERATOR
CTEST_SITE
CTEST_BUILD_NAME
)
- if(NOT DEFINED ${req})
- message(FATAL_ERROR "The containing script must set ${req}")
- endif()
-endforeach()
+ if (NOT DEFINED ${req})
+ message (FATAL_ERROR "The containing script must set ${req}")
+ endif ()
+endforeach ()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+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_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-else()
- if(LOCAL_COVERAGE_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
- endif()
+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_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-endif()
+endif ()
#-----------------------------------------------------------------------------
## -- set output to english
-set($ENV{LC_MESSAGES} "en_EN")
+set ($ENV{LC_MESSAGES} "en_EN")
# Print summary information.
-foreach(v
+foreach (v
CTEST_SITE
CTEST_BUILD_NAME
CTEST_SOURCE_DIRECTORY
@@ -217,9 +217,9 @@ foreach(v CTEST_SCRIPT_DIRECTORY
CTEST_USE_LAUNCHERS
)
- set(vars "${vars} ${v}=[${${v}}]\n")
-endforeach(v)
-message(STATUS "Dashboard script configuration:\n${vars}\n")
+ set (vars "${vars} ${v}=[${${v}}]\n")
+endforeach ()
+message (STATUS "Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
@@ -231,63 +231,63 @@ message(STATUS "Dashboard script configuration:\n${vars}\n") ## -- LOCAL_COVERAGE_TEST executes code coverage process
## --------------------------
ctest_start (${MODEL} TRACK ${MODEL})
- if(LOCAL_UPDATE)
+ if (LOCAL_UPDATE)
ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
- endif()
- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ endif ()
+ 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(LOCAL_SUBMIT)
+ 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()
+ 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(LOCAL_SUBMIT)
+ 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()
+ 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)
+ if (NOT LOCAL_SKIP_TEST)
+ if (NOT LOCAL_MEMCHECK_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Test)
- endif()
- if(${res} LESS 0 OR ${res} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
- endif()
- else()
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ 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)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS MemCheck)
- endif()
- endif()
- if(LOCAL_COVERAGE_TEST)
+ endif ()
+ endif ()
+ if (LOCAL_COVERAGE_TEST)
ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Coverage)
- endif()
- endif()
- endif(NOT LOCAL_SKIP_TEST)
+ endif ()
+ endif ()
+ endif ()
- if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
+ if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
+ execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
ERROR_VARIABLE cpackLog.err
)
- file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if(cpackResult GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
- endif()
- endif()
+ file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ if (cpackResult GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
+ endif ()
+ endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 158290c..55fecfb 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -48,14 +48,14 @@ if(DEFINED CTEST_SCRIPT_ARG) foreach(current_var ${script_args})
if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif()
- endforeach()
-endif()
+ endif ()
+ endforeach ()
+endif ()
# build generator must be defined
if(NOT DEFINED BUILD_GENERATOR)
message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
-else()
+else ()
if(${BUILD_GENERATOR} STREQUAL "Unix")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
@@ -70,10 +70,10 @@ else() set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
- else()
+ else ()
message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
- endif()
-endif()
+ endif ()
+endif ()
###################################################################
### Following Line is one of [Release, RelWithDebInfo, Debug] #####
@@ -83,41 +83,41 @@ set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") if(NOT DEFINED INSTALLDIR)
if(WIN32)
set(INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- else()
+ else ()
set(INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- endif()
-endif()
+ endif ()
+endif ()
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
set(CTEST_CONFIGURATION_TYPE "Release")
-endif()
+endif ()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
-endif()
+endif ()
if(NOT DEFINED STATIC_ONLY)
set(STATICONLYLIBRARIES "YES")
-else()
+else ()
set(STATICONLYLIBRARIES "NO")
-endif()
+endif ()
if(NOT DEFINED FORTRAN_LIBRARIES)
set(FORTRANLIBRARIES "NO")
-else()
+else ()
set(FORTRANLIBRARIES "YES")
-endif()
+endif ()
if(NOT DEFINED JAVA_LIBRARIES)
set(JAVALIBRARIES "NO")
-else()
+else ()
set(JAVALIBRARIES "YES")
-endif()
+endif ()
set(CTEST_BINARY_NAME "build")
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
if(WIN32)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else()
+else ()
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif()
+endif ()
###################################################################
######### Following describes compiler ############
@@ -148,17 +148,17 @@ if(WIN32) set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
- endif()
+ endif ()
## Set the following to unique id your computer ##
set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
-else()
+else ()
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
if(APPLE)
set(CTEST_SITE "MAC.XXXX")
- else()
+ else ()
set(CTEST_SITE "LINUX.XXXX")
- endif()
+ endif ()
if(APPLE)
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -173,8 +173,8 @@ else() set(RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
set(ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
set(ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
- endif()
-endif()
+ endif ()
+endif ()
###################################################################
###################################################################
@@ -207,24 +207,24 @@ if(${STATICONLYLIBRARIES}) ######### Following describes computer ############
## following is optional to describe build ##
set(SITE_BUILDNAME_SUFFIX "STATIC")
-endif()
+endif ()
###################################################################
#### fortran ####
if(${FORTRANLIBRARIES})
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-else()
+else ()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
-endif()
+endif ()
#### java ####
if(${JAVALIBRARIES})
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=ON")
-else()
+else ()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
-endif()
+endif ()
### change install prefix
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
@@ -238,42 +238,42 @@ if(WIN32) include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
-else()
+ endif ()
+else ()
set(BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
include(${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
if(APPLE)
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- else()
+ endif ()
+ else ()
if(CYGWIN)
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- else()
+ endif ()
+ else ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
+ endif ()
if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- endif()
- endif()
-endif()
+ endif ()
+ endif ()
+ endif ()
+endif ()
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index 9c93fb7..c9b4ecc 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -54,8 +54,8 @@ if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM) message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}") - endif() - endif() + endif () + endif () message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") endif () diff --git a/config/cmake_ext_mod/CheckTypeSize.cmake b/config/cmake_ext_mod/CheckTypeSize.cmake index 85b1c6c..d217ac5 100644 --- a/config/cmake_ext_mod/CheckTypeSize.cmake +++ b/config/cmake_ext_mod/CheckTypeSize.cmake @@ -7,7 +7,7 @@ # HAVE_${VARIABLE} - does the variable exists or not # -MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) +macro (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") set (MACRO_CHECK_TYPE_SIZE_FLAGS @@ -47,4 +47,4 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) endif () endif () set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS) -ENDMACRO () +endmacro () diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 1872cd5..2e99c94 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -45,12 +45,12 @@ endif () # does, it appends library to the list. #----------------------------------------------------------------------------- set (LINK_LIBS "") -MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE) +macro (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE) CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE}) if (${VARIABLE}) set (LINK_LIBS ${LINK_LIBS} ${LIBRARY}) endif () -ENDMACRO () +endmacro () # ---------------------------------------------------------------------- # WINDOWS Hard code Values @@ -133,7 +133,7 @@ if (NOT WINDOWS) endif () # For other specific tests, use this MACRO. -MACRO (HDF_FUNCTION_TEST OTHER_TEST) +macro (HDF_FUNCTION_TEST OTHER_TEST) if ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$") set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") set (OTHER_TEST_ADD_LIBRARIES) @@ -178,7 +178,7 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST) ) endif () endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Check for these functions before the time headers are checked @@ -188,12 +188,12 @@ HDF_FUNCTION_TEST (STDC_HEADERS) #----------------------------------------------------------------------------- # Check IF header file exists and add it to the list. #----------------------------------------------------------------------------- -MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) +macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE}) if (${VARIABLE}) set (USE_INCLUDES ${USE_INCLUDES} ${FILE}) endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Check for the existence of certain header files @@ -346,7 +346,7 @@ endif () #----------------------------------------------------------------------------- # Check the size in bytes of all the int and float types #----------------------------------------------------------------------------- -MACRO (HDF_CHECK_TYPE_SIZE type var) +macro (HDF_CHECK_TYPE_SIZE type var) set (aType ${type}) set (aVar ${var}) # message (STATUS "Checking size of ${aType} and storing into ${aVar}") @@ -355,7 +355,7 @@ MACRO (HDF_CHECK_TYPE_SIZE type var) set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}") # message (STATUS "Size of ${aType} was NOT Found") endif () -ENDMACRO () +endmacro () HDF_CHECK_TYPE_SIZE (char ${HDF_PREFIX}_SIZEOF_CHAR) HDF_CHECK_TYPE_SIZE (short ${HDF_PREFIX}_SIZEOF_SHORT) @@ -572,7 +572,7 @@ if (NOT WINDOWS) endif () # For other CXX specific tests, use this MACRO. -MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST) +macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$") set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") set (OTHER_TEST_ADD_LIBRARIES) @@ -617,7 +617,7 @@ MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) endif () endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Check a bunch of cxx functions diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index 1fb07d4..ff1ead2 100644 --- a/config/cmake_ext_mod/FindMPI.cmake +++ b/config/cmake_ext_mod/FindMPI.cmake @@ -471,7 +471,7 @@ function (interrogate_mpi_compiler lang try_libs) PATH_SUFFIXES include Include include/${MS_MPI_ARCH_DIR} Include/${MS_MPI_ARCH_DIR2} Include/${MS_MPI_ARCH_DIR} include/${MS_MPI_ARCH_DIR2} Inc Inc/${MS_MPI_ARCH_DIR} Inc/${MS_MPI_ARCH_DIR2}) if (MPI_INCLUDE_PATH_WORK AND MPI_HEADER_PATH) list(APPEND MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) - endif() + endif () set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) find_library(MPI_LIB @@ -480,8 +480,8 @@ function (interrogate_mpi_compiler lang try_libs) PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}) if (MPI_LIBRARIES_WORK AND MPI_LIB) list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB}) - endif() - endif() + endif () + endif () if (NOT MPI_LIBRARIES_WORK) set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND") diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 1709c2b..bb5f8d6 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -24,7 +24,7 @@ # made to remove references to Qt and make this file more generally applicable ######################################################################### -MACRO (SZIP_ADJUST_LIB_VARS basename) +macro (SZIP_ADJUST_LIB_VARS basename) if (${basename}_INCLUDE_DIR) # if only the release version was found, set the debug variable also to the release version @@ -62,7 +62,7 @@ MACRO (SZIP_ADJUST_LIB_VARS basename) # Make variables changeble to the advanced user MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR ) -ENDMACRO () +endmacro () # Look for the header file. diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 6a81e3a..bf254a1 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -26,7 +26,7 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}") # The provided CMake Fortran macros don't provide a general check function # so this one is used for a sizeof test. #----------------------------------------------------------------------------- -MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) +macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) message (STATUS "Testing Fortran ${FUNCTION}") if (CMAKE_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES @@ -63,7 +63,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" "${OUTPUT}\n\n") endif () -ENDMACRO () +endmacro () #----------------------------------------------------------------------------- # Configure Checks which require Fortran compilation must go in here diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 0a77dae..9a2236e 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -34,6 +34,14 @@ endif () message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") +if (TEST_LIBRARY_DIRECTORY) + if (WIN32 AND NOT MINGW) + set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") + else () + set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") + endif () +endif () + if (TEST_ENV_VAR) set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") endif () @@ -92,8 +100,8 @@ if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) message (STATUS "Output :\n${TEST_STREAM}") - endif() - endif() + endif () + endif () message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") endif () @@ -140,7 +148,7 @@ endif () # remove text from the output file if (TEST_FILTER) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif () @@ -149,7 +157,7 @@ if (TEST_REF_FILTER) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") -endif (TEST_REF_FILTER) +endif () # compare output files to references unless this must be skipped if (NOT TEST_SKIP_COMPARE) @@ -250,7 +258,7 @@ if (NOT TEST_SKIP_COMPARE) if (${len_ref} STREQUAL "0") message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") endif () - endif() + endif () if (NOT ${len_act} STREQUAL ${len_ref}) set (TEST_RESULT 1) endif () |