summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-10-14 13:30:49 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-10-14 13:30:49 (GMT)
commit3c7e11c034b8646d67380789a827709347f45754 (patch)
tree8c997eb2042534f7017e626689488d6b02a5ff90 /hl/tools
parent03a42d466557f7e1f483d62eb1b1b9f91babb09f (diff)
downloadhdf5-3c7e11c034b8646d67380789a827709347f45754.zip
hdf5-3c7e11c034b8646d67380789a827709347f45754.tar.gz
hdf5-3c7e11c034b8646d67380789a827709347f45754.tar.bz2
Reverts rename of SWMR VFD check program, which causes CMake issues
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/h5watch/CMakeLists.txt23
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake2
-rw-r--r--hl/tools/h5watch/Makefile.am4
-rw-r--r--hl/tools/h5watch/testh5watch.sh.in2
4 files changed, 27 insertions, 4 deletions
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index 1ab473d..be983ba 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -40,6 +40,29 @@ if (HDF5_ENABLE_FORMATTERS)
endif ()
if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
+ #-- Add swmr_check_compat_vfd program
+ set (hl_swmr_check_compat_vfd_SOURCES
+ ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
+ )
+ add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES})
+ target_compile_options(hl_swmr_check_compat_vfd PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_include_directories (hl_swmr_check_compat_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT ONLY_SHARED_LIBS)
+ TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC)
+ target_link_libraries (hl_swmr_check_compat_vfd PRIVATE ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd SHARED)
+ target_link_libraries (hl_swmr_check_compat_vfd PRIVATE ${HDF5_LIBSH_TARGET})
+ endif ()
+ set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_H5WATCH_hl_swmr_check_compat_vfd_FORMAT hl_swmr_check_compat_vfd)
+ endif ()
+
#-- Add extend_dset program
set (extend_dset_SOURCES
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index dbda07f..60c099b 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -149,7 +149,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-set (SWMR_INCOMPAT ${swmr_compat_vfd})
+set (SWMR_INCOMPAT ${hl_swmr_check_compat_vfd})
if (NOT SWMR_INCOMPAT)
# Remove any output file left over from previous test run
diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am
index b569214..5112965 100644
--- a/hl/tools/h5watch/Makefile.am
+++ b/hl/tools/h5watch/Makefile.am
@@ -24,7 +24,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/sr
# These are our main targets, the tools
bin_PROGRAMS=h5watch
-noinst_PROGRAMS=
+noinst_PROGRAMS=swmr_check_compat_vfd
# Add h5watch specific linker flags here
h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
@@ -37,7 +37,7 @@ if BUILD_TESTS_CONDITIONAL
AM_CPPFLAGS+=-I$(top_srcdir)/hl/test
TEST_SCRIPT=testh5watch.sh
check_SCRIPTS=$(TEST_SCRIPT)
- SCRIPT_DEPEND=extend_dset$(EXEEXT) h5watch$(EXEEXT)
+ SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
noinst_PROGRAMS+=h5watchgentest extend_dset
# Add extend_dset specific preprocessor flags here
# (add the main test subdirectory to the include file path)
diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in
index 72e4140..67ffcc3 100644
--- a/hl/tools/h5watch/testh5watch.sh.in
+++ b/hl/tools/h5watch/testh5watch.sh.in
@@ -16,7 +16,7 @@
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../../../utils/swmr_compat_vfd
+./swmr_check_compat_vfd
rc=$?
if [ $rc != 0 ] ; then
echo