mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-24 15:25:00 +08:00
Revert for older cmake versions (#1974)
* Revert for older cmake versions * Remove unneeded clear/clean tests because of changes to test macro
This commit is contained in:
parent
5d63aca604
commit
60ba2356de
@ -22,17 +22,8 @@ H5_CREATE_VFD_DIR()
|
||||
### T H E T E S T S M A C R O S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
set (CPP_VFD_CLEANFILES
|
||||
*-cpp_testhdf5.out
|
||||
*-cpp_testhdf5.out.err
|
||||
)
|
||||
macro (ADD_VFD_TEST vfdname resultcode)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CPP_VFD_CLEANFILES}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
add_test (
|
||||
NAME CPP_VFD-${vfdname}-cpp_testhdf5
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -45,14 +36,7 @@ macro (ADD_VFD_TEST vfdname resultcode)
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
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 ${CTEST_SHORT_TIMEOUT})
|
||||
add_test (
|
||||
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CPP_VFD_CLEANFILES}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5-clean-objects PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
|
@ -21,9 +21,14 @@
|
||||
#set (MAX_PROC_COUNT 8)
|
||||
|
||||
#############################################################################################
|
||||
#### alternate toolsets ####
|
||||
#### alternate toolsets (Windows usually) ####
|
||||
#set (CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
|
||||
|
||||
#############################################################################################
|
||||
### use a toolchain file (supported everywhere) ####
|
||||
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake")
|
||||
|
||||
#############################################################################################
|
||||
#### Only build static libraries ####
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
|
||||
@ -101,8 +106,3 @@ endif()
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
|
||||
|
||||
#############################################################################################
|
||||
### use a toolchain file
|
||||
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake")
|
||||
|
||||
#############################################################################################
|
||||
|
@ -313,14 +313,14 @@ set (EXTLINKS_CLEANFILES
|
||||
# Remove any output file left over from previous test run
|
||||
add_test (
|
||||
NAME H5TEST-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
|
||||
COMMAND_EXPAND_LISTS
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP clear_H5TEST)
|
||||
add_test (
|
||||
NAME H5TEST-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${test_CLEANFILES} ${EXTLINKS_CLEANFILES}
|
||||
COMMAND_EXPAND_LISTS
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
|
@ -24,26 +24,10 @@
|
||||
##############################################################################
|
||||
|
||||
macro (ADD_H5_TEST resultfile resultcode)
|
||||
add_test (
|
||||
NAME H5LIBTEST-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
add_test (NAME H5LIBTEST-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5tools_test_utils> ${ARGN})
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES DEPENDS H5LIBTEST-${resultfile}-clear-objects)
|
||||
add_test (
|
||||
NAME H5LIBTEST-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LIBTEST-${resultfile}-clean-objects PROPERTIES DEPENDS H5LIBTEST-${resultfile})
|
||||
endmacro ()
|
||||
|
||||
##############################################################################
|
||||
|
@ -120,15 +120,6 @@
|
||||
##############################################################################
|
||||
|
||||
macro (ADD_H5_PBITS_TEST resultfile resultcode)
|
||||
add_test (
|
||||
NAME H5DUMP-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits"
|
||||
)
|
||||
# If using memchecker add tests without using scripts
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
|
||||
@ -150,17 +141,6 @@
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES
|
||||
DEPENDS H5DUMP-${resultfile}-clear-objects
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits"
|
||||
)
|
||||
add_test (
|
||||
NAME H5DUMP-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS H5DUMP-${resultfile}
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits"
|
||||
)
|
||||
endmacro ()
|
||||
|
@ -117,15 +117,6 @@
|
||||
|
||||
macro (ADD_H5_VDS_TEST resultfile resultcode)
|
||||
# If using memchecker add tests without using scripts
|
||||
add_test (
|
||||
NAME H5DUMP-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds"
|
||||
)
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
|
||||
if (${resultcode})
|
||||
@ -146,17 +137,6 @@
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES
|
||||
DEPENDS H5DUMP-${resultfile}-clear-objects
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds"
|
||||
)
|
||||
add_test (
|
||||
NAME H5DUMP-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS H5DUMP-${resultfile}
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds"
|
||||
)
|
||||
endmacro ()
|
||||
|
@ -175,15 +175,6 @@
|
||||
endmacro ()
|
||||
|
||||
macro (ADD_XML_H5_TEST resultfile resultcode)
|
||||
add_test (
|
||||
NAME H5DUMP_XML-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP_XML-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml"
|
||||
)
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --xml ${ARGN})
|
||||
if (${resultcode})
|
||||
@ -204,17 +195,6 @@
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES
|
||||
DEPENDS H5DUMP_XML-${resultfile}-clear-objects
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml"
|
||||
)
|
||||
add_test (
|
||||
NAME H5DUMP_XML-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP_XML-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS H5DUMP_XML-${resultfile}
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml"
|
||||
)
|
||||
endmacro ()
|
||||
|
@ -41,15 +41,6 @@ add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF
|
||||
|
||||
macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME H5DUMP_VFD-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP_VFD-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
)
|
||||
add_test (
|
||||
NAME H5DUMP_VFD-${vfdname}-${resultfile}-h5dump
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -65,20 +56,8 @@ macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode)
|
||||
)
|
||||
set_tests_properties (H5DUMP_VFD-${vfdname}-${resultfile}-h5dump PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
|
||||
set_tests_properties (H5DUMP_VFD-${resultfile} PROPERTIES
|
||||
DEPENDS H5DUMP_VFD-${resultfile}-clear-objects
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
)
|
||||
add_test (
|
||||
NAME H5DUMP_VFD-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5DUMP_VFD-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS H5DUMP_VFD-${resultfile}
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
)
|
||||
endmacro ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
|
@ -135,15 +135,6 @@
|
||||
##############################################################################
|
||||
|
||||
macro (ADD_H5_TEST resultfile resultcode)
|
||||
add_test (
|
||||
NAME H5LS-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
# If using memchecker add tests without using scripts
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
|
||||
@ -169,31 +160,11 @@
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES
|
||||
DEPENDS "H5LS-${resultfile}-clear-objects"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
add_test (
|
||||
NAME H5LS-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS "H5LS-${resultfile}"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
endmacro ()
|
||||
|
||||
macro (ADD_H5_ERR_TEST resultfile resultcode)
|
||||
add_test (
|
||||
NAME H5LS-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
# If using memchecker add tests without using scripts
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
|
||||
@ -217,32 +188,12 @@
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES
|
||||
DEPENDS "H5LS-${resultfile}-clear-objects"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
add_test (
|
||||
NAME H5LS-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS "H5LS-${resultfile}"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
endmacro ()
|
||||
|
||||
macro (ADD_H5_UD_TEST testname resultcode resultfile)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME H5LS_UD-${testname}-${resultfile}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS_UD-${testname}-${resultfile}-clear-objects PROPERTIES
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
add_test (
|
||||
NAME H5LS_UD-${testname}-${resultfile}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -259,17 +210,6 @@
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
set_tests_properties (H5LS_UD-${testname}-${resultfile} PROPERTIES
|
||||
DEPENDS "H5LS_UD-${testname}-${resultfile}-clear-objects"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
add_test (
|
||||
NAME H5LS_UD-${testname}-${resultfile}-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove
|
||||
${resultfile}.out
|
||||
${resultfile}.out.err
|
||||
)
|
||||
set_tests_properties (H5LS_UD-${testname}-${resultfile}-clean-objects PROPERTIES
|
||||
DEPENDS "H5LS_UD-${testname}-${resultfile}"
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
|
||||
)
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user