From cd7682cd1805da12089652aaa7b77af42fbd6aa2 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Tue, 19 Nov 2024 13:09:31 -0600 Subject: [PATCH 1/2] Remove CMake-3.31.0 warnings (#5091) --- fortran/src/CMakeLists.txt | 6 ------ fortran/test/CMakeLists.txt | 1 - hl/fortran/src/CMakeLists.txt | 2 -- 3 files changed, 9 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c94abaa6c53..dc8a4b6c773 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -133,7 +133,6 @@ add_custom_command (TARGET H5match_types POST_BUILD BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5match_types ) if (BUILD_STATIC_LIBS) @@ -144,7 +143,6 @@ if (BUILD_STATIC_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -157,7 +155,6 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -286,7 +283,6 @@ add_custom_command (TARGET H5_buildiface POST_BUILD BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5_buildiface ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" ) if (BUILD_STATIC_LIBS) @@ -295,7 +291,6 @@ if (BUILD_STATIC_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 file" ) add_custom_target (H5gen ALL @@ -310,7 +305,6 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 shared file" ) add_custom_target (H5genSH ALL diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index c9dc48f01d6..831438cc082 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -107,7 +107,6 @@ else () BYPRODUCTS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared - DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 shared file" ) add_custom_target (H5testgenSH ALL diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 60226c81ab1..649a9674d51 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -116,7 +116,6 @@ if (BUILD_STATIC_LIBS) BYPRODUCTS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static - DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files" ) add_custom_target (H5HLgen ALL @@ -133,7 +132,6 @@ if (BUILD_SHARED_LIBS) BYPRODUCTS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared - DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files" ) add_custom_target (H5HLgenSH ALL From 258fa78c4c31aed09da52414e64933e550954f83 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:18:17 -0600 Subject: [PATCH 2/2] Add check for PERL_FOUND around actual test (#5130) --- test/ShellTests.cmake | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index 88486131860..2d508e01626 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -47,9 +47,6 @@ elseif (UNIX) ############################################################################## # configure scripts to test dir ############################################################################## - if (H5_PERL_FOUND) - configure_file(${HDF5_TEST_SOURCE_DIR}/test_flush_refresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh @ONLY) - endif () configure_file(${HDF5_TEST_SOURCE_DIR}/test_use_cases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_use_cases.sh @ONLY) configure_file(${HDF5_TEST_SOURCE_DIR}/test_swmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.sh @ONLY) configure_file(${HDF5_TEST_SOURCE_DIR}/test_vds_swmr.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.sh @ONLY) @@ -99,14 +96,18 @@ elseif (UNIX) # test_use_cases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes # test_swmr.sh: swmr* # test_vds_swmr.sh: vds_swmr* - add_test (H5SHELL-test_flush_refresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh) - set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES - ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) - if ("H5SHELL-test_flush_refresh" MATCHES "${HDF5_DISABLE_TESTS_REGEX}") - set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES DISABLED true) + if (H5_PERL_FOUND) + configure_file(${HDF5_TEST_SOURCE_DIR}/test_flush_refresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh @ONLY) + add_test (H5SHELL-test_flush_refresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_flush_refresh.sh) + set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) + if ("H5SHELL-test_flush_refresh" MATCHES "${HDF5_DISABLE_TESTS_REGEX}") + set_tests_properties (H5SHELL-test_flush_refresh PROPERTIES DISABLED true) + endif () endif () + add_test (H5SHELL-test_use_cases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_use_cases.sh) set_tests_properties (H5SHELL-test_use_cases PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" @@ -115,6 +116,7 @@ elseif (UNIX) if ("H5SHELL-test_use_cases" MATCHES "${HDF5_DISABLE_TESTS_REGEX}") set_tests_properties (H5SHELL-test_use_cases PROPERTIES DISABLED true) endif () + add_test (H5SHELL-test_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_swmr.sh) set_tests_properties (H5SHELL-test_swmr PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" @@ -123,6 +125,7 @@ elseif (UNIX) if ("H5SHELL-test_swmr" MATCHES "${HDF5_DISABLE_TESTS_REGEX}") set_tests_properties (H5SHELL-test_swmr PROPERTIES DISABLED true) endif () + add_test (H5SHELL-test_vds_swmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_vds_swmr.sh) set_tests_properties (H5SHELL-test_vds_swmr PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"