diff options
55 files changed, 762 insertions, 756 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index e1504bf..3f0f7ca 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -8,7 +8,7 @@ if (WIN32) find_program (NSIS_EXECUTABLE NSIS.exe PATHS "$ENV{ProgramFiles}\\NSIS" "$ENV{ProgramFiles${PF_ENV_EXT}}\\NSIS") if(NOT CPACK_WIX_ROOT) file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT) - endif() + endif () find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin") endif () diff --git a/UserMacros.cmake b/UserMacros.cmake index 4593753..01e76ed 100644 --- a/UserMacros.cmake +++ b/UserMacros.cmake @@ -7,9 +7,9 @@ #----------------------------------------------------------------------------- # Option to Build with User Defined Values #----------------------------------------------------------------------------- -MACRO (MACRO_USER_DEFINED_LIBS) +macro (MACRO_USER_DEFINED_LIBS) set (USER_DEFINED_VALUE "FALSE") -ENDMACRO () +endmacro () #------------------------------------------------------------------------------- option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF) diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake index 3f90d5b..d23a80b 100644 --- a/c++/test/CMakeTests.cmake +++ b/c++/test/CMakeTests.cmake @@ -51,7 +51,7 @@ if (HDF5_TEST_VFD) set (VFD_LIST ${VFD_LIST} direct) endif () - MACRO (ADD_VFD_TEST vfdname resultcode) + macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}") add_test ( @@ -80,7 +80,7 @@ if (HDF5_TEST_VFD) set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects) set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30) endif () - ENDMACRO () + endmacro () # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) 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..eadff5f 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -16,94 +16,94 @@ set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) #FORTRAN_LIBRARIES - Default is NO #JAVA_LIBRARIES - Default is NO ##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac) -if(DEFINED CTEST_SCRIPT_ARG) +if (DEFINED CTEST_SCRIPT_ARG) # transform ctest script arguments of the form # script.ctest,var1=value1,var2=value2 # to variables with the respective names set to the respective values - string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach(current_var ${script_args}) + string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach (current_var ${script_args}) if ("${current_var}" MATCHES "^([^=]+)=(.+)$") - set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - endforeach() -endif() -if(NOT DEFINED INSTALLDIR) - set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") -endif() -if(NOT DEFINED CTEST_CONFIGURATION_TYPE) - set(CTEST_CONFIGURATION_TYPE "Release") -endif() -if(NOT DEFINED CTEST_SOURCE_NAME) - set(CTEST_SOURCE_NAME "HDF5Examples") -endif() -if(NOT DEFINED STATIC_ONLY) - set(STATICONLYLIBRARIES "YES") -else(NOT DEFINED STATIC_ONLY) - set(STATICONLYLIBRARIES "NO") -endif() -if(NOT DEFINED FORTRAN_LIBRARIES) - set(FORTRANLIBRARIES "NO") -else(NOT DEFINED FORTRAN_LIBRARIES) - set(FORTRANLIBRARIES "YES") -endif() -if(NOT DEFINED JAVA_LIBRARIES) - set(JAVALIBRARIES "NO") -else(NOT DEFINED JAVA_LIBRARIES) - set(JAVALIBRARIES "YES") -endif() -if(NOT DEFINED HDF_LOCAL) - set(CDASH_LOCAL "NO") -else(NOT HDF_LOCAL) - set(CDASH_LOCAL "YES") -endif() + set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif () + endforeach () +endif () +if (NOT DEFINED INSTALLDIR) + set (INSTALLDIR "@CMAKE_INSTALL_PREFIX@") +endif () +if (NOT DEFINED CTEST_CONFIGURATION_TYPE) + set (CTEST_CONFIGURATION_TYPE "Release") +endif () +if (NOT DEFINED CTEST_SOURCE_NAME) + set (CTEST_SOURCE_NAME "HDF5Examples") +endif () +if (NOT DEFINED STATIC_ONLY) + set (STATICONLYLIBRARIES "YES") +else () + set (STATICONLYLIBRARIES "NO") +endif () +if (NOT DEFINED FORTRAN_LIBRARIES) + set (FORTRANLIBRARIES "NO") +else () + set (FORTRANLIBRARIES "YES") +endif () +if (NOT DEFINED JAVA_LIBRARIES) + set (JAVALIBRARIES "NO") +else () + set (JAVALIBRARIES "YES") +endif () +if (NOT DEFINED HDF_LOCAL) + set (CDASH_LOCAL "NO") +else () + set (CDASH_LOCAL "YES") +endif () if(NOT DEFINED CTEST_SITE) - set(CTEST_SITE "local") -endif() + set (CTEST_SITE "local") +endif () if(NOT DEFINED CTEST_BUILD_NAME) - set(CTEST_BUILD_NAME "examples") -endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") + set (CTEST_BUILD_NAME "examples") +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() +#if (NOT DEFINED TAR_SOURCE) +# set (CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source") +#endif () ############################################################################################################### # Adjust the following SET Commands as needed ############################################################################################################### -if(WIN32) - if(${STATICONLYLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") - 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}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else(WIN32) - if(${STATICONLYLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif() - set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") - set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif(WIN32) -if(${FORTRANLIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") -else() - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -endif() +if (WIN32) + if (${STATICONLYLIBRARIES}) + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") + 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}") + set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else () + if (${STATICONLYLIBRARIES}) + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif () + set (ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") + set (ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set (CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif () +if (${FORTRANLIBRARIES}) + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") +else () + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +endif () if(${JAVALIBRARIES}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") -else() - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF") -endif() + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") +else () + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF") +endif () if(${CDASH_LOCAL}) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif() -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") +endif () +set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") ############################################################################################################### # For any comments please contact cdashhelp@hdfgroup.org @@ -113,99 +113,99 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HD #----------------------------------------------------------------------------- # 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}") - if(NOT NO_MAC_FORTRAN) + 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} -DHDF_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} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + else () + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") + endif () + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif () #----------------------------------------------------------------------------- -set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") ## -------------------------- -if(CTEST_USE_TAR_SOURCE) +if (CTEST_USE_TAR_SOURCE) ## Uncompress source if tar or zip file provided ## -------------------------- - 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() - 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() + 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 () + 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 () - 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(CTEST_USE_TAR_SOURCE) + 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() #----------------------------------------------------------------------------- ## Clear the build directory ## -------------------------- -set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") - ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY}) else () - file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + file (MAKE_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 () 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}\"" ) #----------------------------------------------------------------------------- ## -- set output to english -set($ENV{LC_MESSAGES} "en_EN") +set ($ENV{LC_MESSAGES} "en_EN") #----------------------------------------------------------------------------- -configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) +configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") ## NORMAL process ## -------------------------- 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() -if(LOCAL_SUBMIT) +if (${res} LESS 0 OR ${res} GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") +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) +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(LOCAL_SUBMIT) +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) +if (${res} LESS 0 OR ${res} GREATER 0) file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") -endif() -if(LOCAL_SUBMIT) +endif () +if (LOCAL_SUBMIT) ctest_submit (PARTS Test) -endif() -if(${res} LESS 0 OR ${res} GREATER 0) +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 +message (STATUS "DONE") 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 () diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index ea21fa4..5665a2f 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -116,7 +116,7 @@ if (HDF5_ENABLE_F2003) endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f03_ex_${example}") if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -135,15 +135,15 @@ if (HDF5_ENABLE_F2003) endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f03_ex-shared_${example}") - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - endforeach (example ${F2003_examples}) -endif (HDF5_ENABLE_F2003) + endif () + endforeach () +endif () if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>) - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + endif () +endif () diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake index 3bbe91f..5645155 100644 --- a/hl/examples/CMakeTests.cmake +++ b/hl/examples/CMakeTests.cmake @@ -12,7 +12,7 @@ set (HDF5_TEST_FILES foreach (h5_file ${HDF5_TEST_FILES}) HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "hl_ex_ex_ds1_files") -endforeach (h5_file ${HDF5_TEST_FILES}) +endforeach () add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list}) # Remove any output file left over from previous test run diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake index 6d8a09b..b5f5fc6 100644 --- a/hl/fortran/examples/CMakeTests.cmake +++ b/hl/fortran/examples/CMakeTests.cmake @@ -31,4 +31,4 @@ foreach (example ${examples}) ) endif () set_tests_properties (HL_FORTRAN_f90_ex_${example} PROPERTIES DEPENDS HL_FORTRAN_f90_ex-clear-objects) -endforeach (example ${examples}) +endforeach () diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake index c5b051f..211c501 100644 --- a/hl/test/CMakeTests.cmake +++ b/hl/test/CMakeTests.cmake @@ -29,13 +29,13 @@ set (HL_REFERENCE_TEST_FILES # -------------------------------------------------------------------- foreach (h5_file ${HL_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_HL_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}" "hl_test_files") -endforeach (h5_file ${HL_REFERENCE_TEST_FILES}) +endforeach () add_custom_target(hl_test_files ALL COMMENT "Copying files needed by hl_test tests" DEPENDS ${hl_test_files_list}) # -------------------------------------------------------------------- # Macro used to add a unit test # -------------------------------------------------------------------- -MACRO (HL_ADD_TEST hl_name) +macro (HL_ADD_TEST hl_name) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>) else () @@ -56,7 +56,7 @@ MACRO (HL_ADD_TEST hl_name) WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR} ) endif () -ENDMACRO () +endmacro () # Remove any output file left over from previous test run add_test ( diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake index 83386de..2242692 100644 --- a/hl/tools/h5watch/CMakeTests.cmake +++ b/hl/tools/h5watch/CMakeTests.cmake @@ -64,21 +64,9 @@ endforeach () ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST resultfile resultcode) + macro (ADD_H5_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5WATCH_ARGS-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${resultfile}.out - ${resultfile}.out.err - ) - set_tests_properties (H5WATCH_ARGS-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5WATCH_ARGS-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5WATCH_ARGS-${resultfile}-clearall-objects") - add_test ( NAME H5WATCH_ARGS-h5watch-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>" @@ -89,20 +77,18 @@ endforeach () -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS H5WATCH_ARGS-${resultfile}-clear-objects) - set (last_test "H5WATCH_ARGS-${resultfile}") + set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS ${last_test}) + set (last_test "H5WATCH_ARGS-h5watch-${resultfile}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_WATCH resultfile resultcode) + macro (ADD_H5_WATCH resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5WATCH-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5 - ${resultfile}.out - ${resultfile}.out.err ) set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") add_test ( @@ -118,7 +104,7 @@ endforeach () ) set_tests_properties (H5WATCH-${resultfile} PROPERTIES DEPENDS H5WATCH-${resultfile}-clear-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## @@ -130,7 +116,7 @@ endforeach () # supports SWMR. set (SWMR_INCOMPAT ${hl_swmr_check_compat_vfd}) -IF (NOT SWMR_INCOMPAT) +if (NOT SWMR_INCOMPAT) # Remove any output file left over from previous test run add_test ( NAME H5WATCH-clearall-objects @@ -169,23 +155,23 @@ IF (NOT SWMR_INCOMPAT) set (last_test "H5WATCH-h5watchgentest") # Test on --help options - ADD_H5_TEST(w-help1 0 --help) + ADD_H5_TEST (w-help1 0 --help) # # Tests on expected failures - ADD_H5_TEST(w-err-dset1 1 WATCH.h5) - ADD_H5_TEST(w-err-dset2 1 WATCH.h5/group/DSET_CMPD) - ADD_H5_TEST(w-err-dset-none 1 WATCH.h5/DSET_NONE) - ADD_H5_TEST(w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX) - ADD_H5_TEST(w-err-file 1 ../WATCH.h5/DSET_CMPD) - ADD_H5_TEST(w-err-width 1 --width=-8 WATCH.h5/DSET_ONE) - ADD_H5_TEST(w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE) - ADD_H5_TEST(w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE) + ADD_H5_TEST (w-err-dset1 1 WATCH.h5) + ADD_H5_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD) + ADD_H5_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE) + ADD_H5_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX) + ADD_H5_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE) + ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE) + ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE) # # Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD - ADD_H5_TEST(w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD) - ADD_H5_TEST(w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD) - ADD_H5_TEST(w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD) - ADD_H5_TEST(w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD) - ADD_H5_TEST(w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD) + ADD_H5_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD) # -ENDIF () +endif () diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index b97c638..d698cfd 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -65,10 +65,10 @@ MACRO (ADD_H5_TEST resultfile resultcode) if (CMAKE_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else() + else () set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif() - endif() + endif () + endif () add_test ( NAME JAVA_datasets-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index 18e7df5..8569b8b 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -65,10 +65,10 @@ MACRO (ADD_H5_TEST resultfile resultcode) if (CMAKE_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else() + else () set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif() - endif() + endif () + endif () add_test ( NAME JAVA_datatypes-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 9e1a09a..bb5f80f 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -64,10 +64,10 @@ MACRO (ADD_H5_TEST resultfile resultcode) if (CMAKE_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else() + else () set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif() - endif() + endif () + endif () add_test ( NAME JAVA_groups-${resultfile} COMMAND "${CMAKE_COMMAND}" diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index d0bdcb0..8912b3f 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -91,10 +91,10 @@ set (testfilter "OK (598 tests)") if (CMAKE_BUILD_TYPE MATCHES Debug) if (WIN32) set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_D;") - else() + else () set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") - endif() -endif() + endif () +endif () add_test ( NAME JUnit-interface-clearall-objects diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 119a6fa..70ec47f 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -707,14 +707,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") @@ -729,10 +729,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] ##### @@ -742,41 +742,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 ############ @@ -807,17 +807,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) @@ -832,8 +832,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 () ################################################################### ################################################################### @@ -866,24 +866,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}") @@ -897,45 +897,45 @@ 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 () HDF5options.cmake: ############################################################################################# diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index 378298a..87ebafc 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -269,12 +269,12 @@ if (NOT DEFINED STATIC_ONLY) set (STATICONLYLIBRARIES "YES") else () set (STATICONLYLIBRARIES "NO") -endif() +endif () if (NOT DEFINED FORTRAN_LIBRARIES) set (FORTRANLIBRARIES "NO") else () set (FORTRANLIBRARIES "YES") -endif() +endif () if (NOT DEFINED JAVA_LIBRARIES) set (JAVALIBRARIES "NO") else () @@ -314,7 +314,7 @@ else () 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 () set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") @@ -407,7 +407,7 @@ endif () ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) if (LOCAL_SUBMIT) ctest_submit (PARTS Test) -endif() +endif () if (res GREATER 0) message (FATAL_ERROR "tests FAILED") endif () diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2480758..9657971 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -283,7 +283,7 @@ set (H5_VDS_SWMR_TESTS foreach (test ${H5_VDS_SWMR_TESTS}) ADD_H5_EXE(${test}) -endforeach (test ${H5_VDS_SWMR_TESTS}) +endforeach () ############################################################################## ############################################################################## @@ -309,7 +309,7 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) +endif () #-- Adding test for hyperslab add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 8b078d2..fc8587b 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -227,7 +227,7 @@ endif () add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list}) if (BUILD_SHARED_LIBS) add_custom_target(HDF5_TEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_TEST_LIBSH tests" DEPENDS ${HDF5_TEST_LIBSH_files_list}) -endif() +endif () # Remove any output file left over from previous test run add_test (NAME H5TEST-clear-testhdf5-objects @@ -1060,7 +1060,7 @@ if (HDF5_TEST_VFD) endif () # Windows only macro - MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) + macro (CHECK_VFD_TEST vfdtest vfdname resultcode) if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) @@ -1103,7 +1103,7 @@ if (HDF5_TEST_VFD) COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" ) endif () - endif() + endif () else () add_test (NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" @@ -1168,9 +1168,9 @@ if (HDF5_TEST_VFD) ) endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_VFD_TEST vfdname resultcode) + macro (ADD_VFD_TEST vfdname resultcode) foreach (test ${H5_VFD_TESTS}) if (WIN32) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) @@ -1257,7 +1257,7 @@ if (HDF5_TEST_VFD) ) endif () endif () - ENDMACRO () + endmacro () # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) @@ -1273,13 +1273,13 @@ endif () ############################################################################## if (HDF5_BUILD_GENERATORS) - MACRO (ADD_H5_GENERATOR genfile) + macro (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) TARGET_NAMING (${genfile} STATIC) TARGET_C_PROPERTIES (${genfile} STATIC " " " ") target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/test) - ENDMACRO () + endmacro () # generator executables set (H5_GENERATORS diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index e176ebc..298d326 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -54,6 +54,6 @@ set (H5P_TESTS foreach (testp ${H5P_TESTS}) ADD_H5P_EXE(${testp}) -endforeach (testp ${H5P_TESTS}) +endforeach () include (CMakeTests.cmake) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 86eaa03..7dce6d6 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -36,7 +36,7 @@ if (HDF5_TEST_VFD) set (VFD_LIST ${VFD_LIST} direct) endif () - MACRO (ADD_VFD_TEST vfdname resultcode) + macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) foreach (test ${H5P_VFD_TESTS}) add_test ( @@ -52,7 +52,7 @@ if (HDF5_TEST_VFD) ) endforeach () endif () - ENDMACRO () + endmacro () # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index 9cf2e4f..42495de 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -24,7 +24,7 @@ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) get_filename_component(fname "${listfiles}" NAME) HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5copy_files") - endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + endforeach () add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list}) ############################################################################## @@ -36,7 +36,7 @@ # # Perform h5copy according to passing parmeters # - MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname) + macro (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -70,9 +70,9 @@ set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname) + macro (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -106,18 +106,18 @@ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_SKIP_H5_TEST testname skipresultfile) + macro (ADD_SKIP_H5_TEST testname skipresultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5COPY-${testname}-${skipresultfile}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname}-${skipresultfile} ${ARGN}" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname) + macro (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -156,9 +156,9 @@ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname) + macro (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -197,13 +197,13 @@ set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () - ENDMACRO () + endmacro () # # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target # files instead of checking with h5ls. # - MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname) + macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) @@ -235,7 +235,7 @@ ) set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## @@ -326,6 +326,7 @@ ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl) ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl) + ADD_H5_TEST (dset_attr 0 ${HDF_FILE1}.h5 -v -s dset_attr -d dset_attr) # "Test copying dataset within group in source file to root of destination" ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top) @@ -342,6 +343,7 @@ ADD_H5_TEST (grp_dsets 2 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets) ADD_H5_TEST (grp_nested 2 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested) endif () + ADD_H5_TEST (grp_attr 0 ${HDF_FILE1}.h5 -v -s grp_attr -d grp_attr) # "Test copying dataset within group in source file to group in destination" ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group) diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in index 6d1478a..dbee089 100644 --- a/tools/test/h5copy/testh5copy.sh.in +++ b/tools/test/h5copy/testh5copy.sh.in @@ -21,6 +21,10 @@ srcdir=@srcdir@ +# Determine which filters are available +USE_FILTER_SZIP="@USE_FILTER_SZIP@" +USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" + # source dirs SRC_TOOLS="$srcdir/../.." SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" @@ -78,7 +82,7 @@ AWK='awk' nerrors=0 verbose=yes -h5haveexitcode=yes # default is yes +h5haveexitcode=yes # default is yes TESTDIR=./testfiles test -d $TESTDIR || mkdir $TESTDIR @@ -111,10 +115,10 @@ COPY_TESTFILES_TO_TESTDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $TESTDIR + $CP -f $tstfile $TESTDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." - + # Comment out this to CREATE expected file exit $EXIT_FAILURE fi @@ -139,13 +143,13 @@ CLEAN_TESTFILES_AND_TESTDIR() # Print a "SKIP" message SKIP() { - TESTING $H5COPY $@ - echo " -SKIP-" + TESTING $H5COPY $@ + echo " -SKIP-" } # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". -TESTING() +TESTING() { SPACES=" " echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' @@ -154,7 +158,7 @@ TESTING() # Print a line-line message left justified in a field of 70 characters # beginning with the word "Verifying". # -VERIFY() +VERIFY() { SPACES=" " echo "Verifying h5diff output $* $SPACES" | cut -c1-70 | tr -d '\012' @@ -163,7 +167,7 @@ VERIFY() # Print a line-line message left justified in a field of 70 characters # beginning with the word "Verifying". # -VERIFY_OUTPUT() +VERIFY_OUTPUT() { SPACES=" " echo "Verifying output files $* $SPACES" | cut -c1-70 | tr -d '\012' @@ -182,7 +186,7 @@ VERIFY_OUTPUT() # $4 is output file # $* everything else arguments for h5copy. -TOOLTEST() +TOOLTEST() { actualout="$TESTDIR/tooltest.actualout" actualerr="$TESTDIR/tooltest.actualerr" @@ -199,7 +203,7 @@ TOOLTEST() fi if [ "$3" = -o ]; then outputfile=$4 - else + else if [ "$1" = -f ]; then outputfile=$6 else @@ -207,7 +211,7 @@ TOOLTEST() fi runh5diff=no fi - + TESTING $H5COPY $@ ( echo "#############################" @@ -223,7 +227,7 @@ TOOLTEST() nerrors="`expr $nerrors + 1`" else echo " PASSED" - + if [ $runh5diff != no ]; then H5DIFFTEST $inputfile $outputfile $7 $9 fi @@ -236,7 +240,7 @@ TOOLTEST() } # TOOLTEST back-to-back -TOOLTEST_PREFILL() +TOOLTEST_PREFILL() { actualout="$TESTDIR/tooltest.actualout" actualerr="$TESTDIR/tooltest.actualerr" @@ -248,21 +252,21 @@ TOOLTEST_PREFILL() fi if [ "$3" = -o ]; then outputfile=$4 - else + else runh5diff=no fi - + grp_name=$5 grp_name2=$6 obj_name=$7 obj_name2=$8 - + TESTING $H5COPY $@ ( echo "#############################" echo " output for '$H5COPY $@'" echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2 + $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2 ) > $actualout 2> $actualerr RET=$? if [ $RET != 0 ]; then @@ -276,7 +280,7 @@ TOOLTEST_PREFILL() echo "#############################" echo " output for '$H5COPY $@'" echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2 + $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2 ) > $actualout 2> $actualerr RET=$? if [ $RET != 0 ]; then @@ -286,11 +290,11 @@ TOOLTEST_PREFILL() nerrors="`expr $nerrors + 1`" else echo " PASSED" - + if [ $runh5diff != no ]; then H5DIFFTEST $inputfile $outputfile $obj_name $obj_name2 fi - + # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actualout $actualerr $outputfile @@ -300,7 +304,7 @@ TOOLTEST_PREFILL() } # TOOLTEST back-to-back -TOOLTEST_SAME() +TOOLTEST_SAME() { actualout="$TESTDIR/tooltest.actualout" actualerr="$TESTDIR/tooltest.actualerr" @@ -312,19 +316,19 @@ TOOLTEST_SAME() fi if [ "$3" = -o ]; then outputfile=$4 - else + else runh5diff=no fi - + grp_name=$5 grp_name2=$6 - + TESTING $H5COPY $@ ( echo "#############################" echo " output for '$H5COPY $@'" echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name + $RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name ) > $actualout 2> $actualerr RET=$? if [ $RET != 0 ]; then @@ -338,7 +342,7 @@ TOOLTEST_SAME() echo "#############################" echo " output for '$H5COPY $@'" echo "#############################" - $RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2 + $RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2 ) > $actualout 2> $actualerr RET=$? if [ $RET != 0 ]; then @@ -348,11 +352,11 @@ TOOLTEST_SAME() nerrors="`expr $nerrors + 1`" else echo " PASSED" - + if [ $runh5diff != no ]; then H5DIFFTEST $outputfile $outputfile $grp_name $grp_name2 fi - + # Clean up output file if test -z "$HDF5_NOCLEANUP"; then rm -f $actualout $actualerr $outputfile @@ -389,7 +393,7 @@ CMP_OUTPUT() fi } -TOOLTEST_FAIL() +TOOLTEST_FAIL() { expectout="$TESTDIR/$1" actualout="$TESTDIR/$1.actualout" @@ -433,7 +437,7 @@ TOOLTEST_FAIL() cat $actualout nerrors="`expr $nerrors + 1`" fi - + # Clean up output file if test -z "$HDF5_NOCLEANUP"; then @@ -444,10 +448,10 @@ TOOLTEST_FAIL() # Call the h5diff tool # -H5DIFFTEST() +H5DIFFTEST() { VERIFY $@ - $RUNSERIAL $H5DIFF_BIN -q "$@" + $RUNSERIAL $H5DIFF_BIN -q "$@" RET=$? if [ $RET != 0 ] ; then echo "*FAILED*" @@ -459,10 +463,10 @@ H5DIFFTEST() # Call the h5diff tool with a call that is expected to fail # -H5DIFFTEST_FAIL() +H5DIFFTEST_FAIL() { VERIFY $@ - $RUNSERIAL $H5DIFF_BIN -q "$@" + $RUNSERIAL $H5DIFF_BIN -q "$@" RET=$? if [ $h5haveexitcode = 'yes' -a $RET != 1 ] ; then @@ -478,7 +482,7 @@ H5DIFFTEST_FAIL() # # Assumed arguments: # <none> -COPY_OBJECTS() +COPY_OBJECTS() { TESTFILE="$TESTDIR/h5copytst.h5" @@ -487,7 +491,9 @@ COPY_OBJECTS() TOOLTEST -i $TESTFILE -o $TESTDIR/chunk.out.h5 -v -s chunk -d chunk TOOLTEST -i $TESTFILE -o $TESTDIR/compact.out.h5 -v -s compact -d compact TOOLTEST -i $TESTFILE -o $TESTDIR/compound.out.h5 -v -s compound -d compound +if test $USE_FILTER_DEFLATE = "yes" ; then TOOLTEST -i $TESTFILE -o $TESTDIR/compressed.out.h5 -v -s compressed -d compressed +fi TOOLTEST -i $TESTFILE -o $TESTDIR/named_vl.out.h5 -v -s named_vl -d named_vl TOOLTEST -i $TESTFILE -o $TESTDIR/nested_vl.out.h5 -v -s nested_vl -d nested_vl TOOLTEST -i $TESTFILE -o $TESTDIR/dset_attr.out.h5 -v -s /dset_attr -d /dset_attr @@ -499,16 +505,19 @@ COPY_OBJECTS() TOOLTEST -i $TESTFILE -o $TESTDIR/dsrename.out.h5 -v -s compound -d rename echo "Test copying empty, 'full' & 'nested' groups" +if test $USE_FILTER_DEFLATE = "yes" ; then TOOLTEST -i $TESTFILE -o $TESTDIR/grp_empty.out.h5 -v -s grp_empty -d grp_empty +fi TOOLTEST -i $TESTFILE -o $TESTDIR/grp_dsets.out.h5 -v -s grp_dsets -d grp_dsets TOOLTEST -i $TESTFILE -o $TESTDIR/grp_nested.out.h5 -v -s grp_nested -d grp_nested TOOLTEST -i $TESTFILE -o $TESTDIR/grp_attr.out.h5 -v -s grp_attr -d grp_attr +if test $USE_FILTER_DEFLATE = "yes" ; then echo "Test copying dataset within group in source file to group in destination" TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/simple_group.out.h5 grp_dsets grp_dsets /grp_dsets/simple /grp_dsets/simple_group - echo "Test copying & renaming group" TOOLTEST -i $TESTFILE -o $TESTDIR/grp_rename.out.h5 -v -s grp_dsets -d grp_rename +fi echo "Test copying 'full' group hierarchy into group in destination file" TOOLTEST_PREFILL -i $TESTFILE -o $TESTDIR/grp_dsets_rename.out.h5 grp_dsets grp_rename grp_dsets /grp_rename/grp_dsets @@ -517,15 +526,17 @@ COPY_OBJECTS() TOOLTEST -i $TESTFILE -o $TESTDIR/A_B1_simple.out.h5 -vp -s simple -d /A/B1/simple TOOLTEST -i $TESTFILE -o $TESTDIR/A_B2_simple2.out.h5 -vp -s simple -d /A/B2/simple2 TOOLTEST -i $TESTFILE -o $TESTDIR/C_D_simple.out.h5 -vp -s /grp_dsets/simple -d /C/D/simple +if test $USE_FILTER_DEFLATE = "yes" ; then TOOLTEST -i $TESTFILE -o $TESTDIR/E_F_grp_dsets.out.h5 -vp -s /grp_dsets -d /E/F/grp_dsets TOOLTEST -i $TESTFILE -o $TESTDIR/G_H_grp_nested.out.h5 -vp -s /grp_nested -d /G/H/grp_nested +fi } # Copy references in various way. # # Assumed arguments: # <none> -COPY_REFERENCES() +COPY_REFERENCES() { TESTFILE="$TESTDIR/h5copy_ref.h5" @@ -538,7 +549,7 @@ COPY_REFERENCES() # # Assumed arguments: # <none> -COPY_EXT_LINKS() +COPY_EXT_LINKS() { TESTFILE="$TESTDIR/h5copy_extlinks_src.h5" @@ -571,7 +582,7 @@ COPY_EXT_LINKS() # # Assumed arguments: # <none> -TEST_MISC() +TEST_MISC() { TESTFILE="$TESTDIR/h5copytst.h5" @@ -579,8 +590,10 @@ TEST_MISC() TOOLTEST_FAIL h5copy_misc1.out -i $TESTFILE -o $TESTDIR/h5copy_misc1.out.h5 -v -s /simple -d /g1/g2/simple echo "Test copying objects to the same file " - TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile1.out.h5 /simple /simple_cp + TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile1.out.h5 /simple /simple_cp +if test $USE_FILTER_DEFLATE = "yes" ; then TOOLTEST_SAME -i $TESTFILE -o $TESTDIR/samefile2.out.h5 /grp_dsets /grp_dsets_cp +fi } ############################################################################## @@ -590,7 +603,7 @@ TEST_MISC() COPY_TESTFILES_TO_TESTDIR # Start tests -COPY_OBJECTS +COPY_OBJECTS COPY_REFERENCES COPY_EXT_LINKS TEST_MISC diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 064e1dd..a8d6356 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -321,7 +321,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST resultfile resultcode) + macro (ADD_H5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN}) @@ -349,9 +349,9 @@ if (H5_HAVE_PARALLEL) ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_PH5_TEST resultfile resultcode) + macro (ADD_PH5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN}) @@ -383,9 +383,9 @@ endif () set (last_test "PH5DIFF-${resultfile}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_UD_TEST testname resultcode resultfile) + macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -428,7 +428,7 @@ endif () set_tests_properties (H5DIFF_UD-${testname} PROPERTIES DEPENDS H5DIFF_UD-${testname}-clearall-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## @@ -1150,8 +1150,7 @@ ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1 g1/d2) # with --use-system-epsilon for float value. expect less differences -ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 -g1/fp2) +ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 g1/fp2) # not comparable -c flag ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) @@ -1442,7 +1441,9 @@ ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dse ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -# VDS +# ############################################################################## +# VDS tests +# ############################################################################## ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2}) ADD_H5_TEST (h5diff_v2 0 -r ${FILEV1} ${FILEV2}) ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2}) @@ -1452,3 +1453,7 @@ ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2}) ############################################################################## ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5) ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5) + +# ############################################################################## +# # END +# ############################################################################## diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index 39b87ca..cc92e22 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -653,8 +653,6 @@ TOOLTEST h5diff_28.txt -v h5diff_types.h5 h5diff_types.h5 l1 l2 TOOLTEST h5diff_30.txt -v h5diff_enum_invalid_values.h5 h5diff_enum_invalid_values.h5 dset1 dset2 - - # ############################################################################## # # Dataset datatypes # ############################################################################## @@ -761,8 +759,6 @@ TOOLTEST h5diff_618.txt -p 2 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 # 6.19: number smaller than smallest difference TOOLTEST h5diff_619.txt -p 0.005 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4 - - # ############################################################################## # # -n # ############################################################################## @@ -815,7 +811,6 @@ TOOLTEST h5diff_tmp2.txt tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.referen # ################################################## # attrs with verbose option level # ################################################## - TOOLTEST h5diff_700.txt -v1 h5diff_attr1.h5 h5diff_attr2.h5 TOOLTEST h5diff_701.txt -v2 h5diff_attr1.h5 h5diff_attr2.h5 TOOLTEST h5diff_702.txt --verbose=1 h5diff_attr1.h5 h5diff_attr2.h5 @@ -866,7 +861,6 @@ TOOLTEST h5diff_103.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h # with --use-system-epsilon for float value TOOLTEST h5diff_104.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2 - # not comparable -c flag TOOLTEST h5diff_200.txt h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2 @@ -994,7 +988,6 @@ TOOLTEST h5diff_424.txt --follow-symlinks -v h5diff_ext2softlink_trg.h5 h5diff_e # extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" TOOLTEST h5diff_425.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_src.h5 /ext_link_to_slink1 /ext_link_to_slink2 - # ############################################################################## # # Dangling links compare (--follow-symlinks and --no-dangling-links) # ############################################################################## @@ -1145,6 +1138,7 @@ TOOLTEST h5diff_540.txt -v compounds_array_vlen1.h5 compounds_array_vlen2.h5 # ############################################################################## # # Test mutually exclusive options # ############################################################################## +# # Test with -d , -p and --use-system-epsilon. TOOLTEST h5diff_640.txt -v -d 5 -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 TOOLTEST h5diff_641.txt -v -d 5 -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 1a335b2..ae760bf 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -383,7 +383,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_HELP_TEST testname resultcode) + macro (ADD_HELP_TEST testname resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) @@ -405,9 +405,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) + macro (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) if (${testtype} STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -418,9 +418,9 @@ else () ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST resultfile resultcode) + macro (ADD_H5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) @@ -451,9 +451,9 @@ ) set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_N resultfile resultcode) + macro (ADD_H5_TEST_N resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) @@ -484,9 +484,9 @@ ) set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) + macro (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}) @@ -524,9 +524,9 @@ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile) + macro (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile}) @@ -571,9 +571,9 @@ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) + macro (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-output-${resultfile}-clear-objects @@ -595,9 +595,9 @@ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_MASK_TEST resultfile resultcode) + macro (ADD_H5_MASK_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile} @@ -612,9 +612,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode) + macro (ADD_H5ERR_MASK_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile} @@ -630,9 +630,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval) + macro (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile} @@ -650,9 +650,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode) + macro (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -680,9 +680,9 @@ set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_UD_TEST testname resultcode resultfile) + macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -707,7 +707,7 @@ ) set_tests_properties (H5DUMP_UD-${testname} PROPERTIES DEPENDS H5DUMP_UD-${testname}-clearall-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake index 75b9a66..770531a 100644 --- a/tools/test/h5dump/CMakeTestsPBITS.cmake +++ b/tools/test/h5dump/CMakeTestsPBITS.cmake @@ -108,7 +108,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_PBITS_TEST resultfile resultcode) + macro (ADD_H5_PBITS_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) @@ -119,7 +119,7 @@ if (NOT "${last_pbits_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) endif () - else (HDF5_ENABLE_USING_MEMCHECKER) + else () add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -132,7 +132,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake index 483d948..d155e55 100644 --- a/tools/test/h5dump/CMakeTestsVDS.cmake +++ b/tools/test/h5dump/CMakeTestsVDS.cmake @@ -87,7 +87,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_VDS_TEST resultfile resultcode) + macro (ADD_H5_VDS_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) @@ -111,9 +111,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_VDS_LAYOUT resultfile resultcode) + macro (ADD_H5_VDS_LAYOUT resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> -p ${ARGN}) @@ -138,7 +138,7 @@ ) set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index 5e1fc7a..2e55818 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -144,7 +144,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) + macro (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) if (${testtype} STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -155,9 +155,9 @@ else () ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_XML_H5_TEST resultfile resultcode) + macro (ADD_XML_H5_TEST resultfile resultcode) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN}) set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") @@ -180,7 +180,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index e0b88a3..4738be5 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -77,7 +77,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_OUTPUT testname resultfile resultcode testfile) + macro (ADD_H5_OUTPUT testname resultfile resultcode testfile) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -124,9 +124,9 @@ set (last_test "H5FC-${testname}-NA") endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST testname resultcode testfile) + macro (ADD_H5_TEST testname resultcode testfile) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -157,9 +157,9 @@ set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile") set (last_test "H5FC-${testname}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_CHECK_IDX dependtest testname) + macro (ADD_H5_CHECK_IDX dependtest testname) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -168,9 +168,9 @@ ) set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${dependtest}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_CHECK_IDX testname resultcode testfile) + macro (ADD_H5_TEST_CHECK_IDX testname resultcode testfile) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -206,9 +206,9 @@ set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${testname}") set (last_test "H5FC_CHECK_IDX-${testname}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_H5DUMP_CHECK testname) + macro (ADD_H5_H5DUMP_CHECK testname) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -251,7 +251,7 @@ set_tests_properties (H5FC_CHECK_DUMP-${testname} PROPERTIES DEPENDS "H5FC-${testname}") set (last_test "H5FC_CHECK_DUMP-${testname}") endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake index 521d138..15b36fc 100644 --- a/tools/test/h5import/CMakeTests.cmake +++ b/tools/test/h5import/CMakeTests.cmake @@ -80,7 +80,7 @@ ### T H E T E S T S M A C R O S ### ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST testname importfile conffile testfile) + macro (ADD_H5_TEST testname importfile conffile testfile) # If using memchecker skip macro based tests if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile}) @@ -126,9 +126,9 @@ ) set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_DUMPTEST testname datasetname testfile) + macro (ADD_H5_DUMPTEST testname datasetname testfile) # If using memchecker skip tests if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -194,16 +194,16 @@ ) set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}") endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) + macro (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5IMPORT-DUMP-${testname}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available" ) endif () - ENDMACRO () + endmacro () # -------------------------------------------------------------------- # Determine if filter is available for h5diff diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake index 6b8316c..d0ba305 100644 --- a/tools/test/h5jam/CMakeTests.cmake +++ b/tools/test/h5jam/CMakeTests.cmake @@ -40,7 +40,7 @@ # TEST_H5JAM_OUTPUT # For the purpose to verify only output & exitcode from h5jam # - MACRO (TEST_H5JAM_OUTPUT expectfile resultcode) + macro (TEST_H5JAM_OUTPUT expectfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN}) @@ -60,13 +60,13 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () # ============================================================ # TEST_H5UNJAM_OUTPUT # For the purpose to verify only output & exitcode from h5unjam # - MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode) + macro (TEST_H5UNJAM_OUTPUT expectfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN}) @@ -86,9 +86,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (CHECKFILE testname testdepends expected actual) + macro (CHECKFILE testname testdepends expected actual) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -118,9 +118,9 @@ ) set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP) endif () - ENDMACRO() + endmacro() - MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile) + macro (UNJAMTEST testname setfile infile ufile chkfile outfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects @@ -213,9 +213,9 @@ CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile}) endif () - ENDMACRO() + endmacro() - MACRO (JAMTEST testname jamfile infile chkfile outfile) + macro (JAMTEST testname jamfile infile chkfile outfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5JAM-${testname}-clear-objects @@ -256,9 +256,9 @@ set_tests_properties (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects) CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile}) endif () - ENDMACRO () + endmacro () - MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) + macro (JAMTEST_NONE testname jamfile infile setfile chkfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5JAM-${testname}_NONE-clear-objects @@ -311,7 +311,7 @@ set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects) CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile}) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 7b68ab1..d5d0eb1 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -111,7 +111,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST resultfile resultcode) + macro (ADD_H5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN}) @@ -135,9 +135,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_UD_TEST testname resultcode resultfile) + macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -162,7 +162,7 @@ ) set_tests_properties (H5LS_UD-${testname} PROPERTIES DEPENDS H5LS_UD-${testname}-clearall-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## @@ -412,9 +412,9 @@ # ( HDFFV-7838, ) if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5) - endif (H5_WORDS_BIGENDIAN) + endif () # test for non-existing file ADD_H5_TEST (nosuchfile 1 nosuchfile.h5) @@ -422,22 +422,22 @@ # test for variable length data types in verbose mode if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5) - endif (H5_WORDS_BIGENDIAN) + endif () # test for dataset region references data types in verbose mode if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tdataregle 0 -v tdatareg.h5) - endif (H5_WORDS_BIGENDIAN) + endif () # test for file with datasets that use Fixed Array chunk indices if (USE_FILTER_DEFLATE) # data read internal filters ADD_H5_TEST (tdset_idx 0 -w80 -d tdset_idx.h5) - endif (USE_FILTER_DEFLATE) + endif () ############################################################################## diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake index d6d2f39..0a7a216 100644 --- a/tools/test/h5ls/CMakeTestsVDS.cmake +++ b/tools/test/h5ls/CMakeTestsVDS.cmake @@ -58,7 +58,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_VDS_TEST resultfile resultcode) + macro (ADD_H5_VDS_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN}) @@ -82,7 +82,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 1717027..aa5a1b4 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -19,7 +19,7 @@ set (VFD_LIST ${VFD_LIST} direct) endif () - MACRO (ADD_VFD_TEST vfdname resultcode) + macro (ADD_VFD_TEST vfdname resultcode) add_test ( NAME H5REPACK-VFD-${vfdname}-h5repacktest COMMAND "${CMAKE_COMMAND}" @@ -35,7 +35,7 @@ set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) endif () set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") - ENDMACRO () + endmacro () endif () # -------------------------------------------------------------------- @@ -140,7 +140,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_HELP_TEST testname resultcode) + macro (ADD_HELP_TEST testname resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN}) @@ -162,9 +162,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_OLD testname testtype testfile) + macro (ADD_H5_TEST_OLD testname testtype testfile) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -186,9 +186,9 @@ ) set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST testname testtype testfile) + macro (ADD_H5_TEST testname testtype testfile) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -210,9 +210,9 @@ ) set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile) + macro (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -244,9 +244,9 @@ set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_MASK_TEST testname testtype resultcode resultfile) + macro (ADD_H5_MASK_TEST testname testtype resultcode resultfile) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -278,9 +278,9 @@ set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test}) endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile) + macro (ADD_H5_DMP_TEST testname testtype resultcode resultfile) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -311,9 +311,9 @@ set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}") endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter) + macro (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -375,9 +375,9 @@ endif () endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_VERIFY_VDS testname testtype resultcode testfile testdset testfilter) + macro (ADD_H5_VERIFY_VDS testname testtype resultcode testfile testdset testfilter) if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( @@ -410,9 +410,9 @@ set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}) endif () endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_TEST_META testname testfile) + macro (ADD_H5_TEST_META testname testfile) add_test ( NAME H5REPACK_META-${testname}_N COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 @@ -429,9 +429,9 @@ add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5) set_tests_properties (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true") set_tests_properties (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M) - ENDMACRO () + endmacro () - MACRO (ADD_H5_UD_TEST testname resultcode resultfile) + macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( @@ -470,7 +470,7 @@ ) set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}") endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake index 4b70050..f6735d5 100644 --- a/tools/test/h5stat/CMakeTests.cmake +++ b/tools/test/h5stat/CMakeTests.cmake @@ -65,7 +65,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST resultfile resultcode) + macro (ADD_H5_TEST resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN}) @@ -88,7 +88,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/misc/CMakeTests.cmake b/tools/test/misc/CMakeTests.cmake index b871b00..9ecdeae 100644 --- a/tools/test/misc/CMakeTests.cmake +++ b/tools/test/misc/CMakeTests.cmake @@ -69,7 +69,7 @@ ############################################################################## ############################################################################## - MACRO (ADD_H5_TEST resultfile resultcode resultoption) + macro (ADD_H5_TEST resultfile resultcode resultoption) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5MKGRP-${resultfile}-clear-objects @@ -89,7 +89,7 @@ if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () - else (HDF5_ENABLE_USING_MEMCHECKER) + else () set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects) add_test ( NAME H5MKGRP-${resultfile}-h5ls @@ -105,9 +105,9 @@ ) set_tests_properties (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile}) endif () - ENDMACRO () + endmacro () - MACRO (ADD_H5_CMP resultfile resultcode) + macro (ADD_H5_CMP resultfile resultcode) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN}) else () @@ -131,7 +131,7 @@ ) set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects) endif () - ENDMACRO () + endmacro () ############################################################################## ############################################################################## diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index b9cffc4..ec672e5 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -12,7 +12,7 @@ MACRO (ADD_H5_GENERATOR genfile) TARGET_C_PROPERTIES (${genfile} STATIC " " " ") target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/tools) -ENDMACRO (ADD_H5_GENERATOR genfile) +ENDMACRO () # generator executables set (H5_GENERATORS @@ -25,4 +25,4 @@ set (H5_GENERATORS foreach (gen ${H5_GENERATORS}) ADD_H5_GENERATOR (${gen}) -endforeach (gen ${H5_GENERATORS}) +endforeach () |