summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/CMakeLists.txt8
-rw-r--r--hl/tools/Makefile.am8
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt10
-rw-r--r--hl/tools/gif2h5/CMakeTests.cmake18
-rw-r--r--hl/tools/h5watch/CMakeLists.txt8
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake17
6 files changed, 44 insertions, 25 deletions
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index fd9b6d9..a0bd744 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,6 +1,12 @@
cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_TOOLS C)
-add_subdirectory (gif2h5)
+#-----------------------------------------------------------------------------
+#-- Option to build the High level GIF Tools
+#-----------------------------------------------------------------------------
+option (HDF5_BUILD_HL_GIF_TOOLS "Build HDF5 HL GIF Tools" OFF)
+if (HDF5_BUILD_HL_GIF_TOOLS)
+ add_subdirectory (gif2h5)
+endif ()
add_subdirectory (h5watch)
diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am
index 6687f40..9f93f67 100644
--- a/hl/tools/Makefile.am
+++ b/hl/tools/Makefile.am
@@ -18,7 +18,13 @@
include $(top_srcdir)/config/commence.am
+if BUILD_TOOLS_HL_GIF_CONDITIONAL
+ TOOLS_GIF_DIR = gif2h5
+else
+ TOOLS_GIF_DIR =
+endif
+
# All subdirectories
-SUBDIRS=gif2h5 h5watch
+SUBDIRS=h5watch $(TOOLS_GIF_DIR)
include $(top_srcdir)/config/conclude.am
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index a797c80..8f18b09 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -17,7 +17,7 @@ set (GIF2H5_SOURCES
if (BUILD_STATIC_LIBS)
add_executable (gif2h5 ${GIF2H5_SOURCES})
target_compile_options(gif2h5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (gif2h5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (gif2h5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (gif2h5 STATIC)
target_link_libraries (gif2h5 PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
@@ -30,7 +30,7 @@ endif ()
if (BUILD_SHARED_LIBS)
add_executable (gif2h5-shared ${GIF2H5_SOURCES})
target_compile_options(gif2h5-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (gif2h5-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (gif2h5-shared PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (gif2h5-shared SHARED)
target_link_libraries (gif2h5-shared PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TOOLS_LIBSH_TARGET})
set_target_properties (gif2h5-shared PROPERTIES FOLDER tools/hl)
@@ -59,7 +59,7 @@ set (hdf2gif_SOURCES
if (BUILD_STATIC_LIBS)
add_executable (h52gif ${hdf2gif_SOURCES})
target_compile_options(h52gif PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (h52gif PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h52gif PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h52gif STATIC)
target_link_libraries (h52gif PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
@@ -72,7 +72,7 @@ endif ()
if (BUILD_SHARED_LIBS)
add_executable (h52gif-shared ${hdf2gif_SOURCES})
target_compile_options(h52gif-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (h52gif-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h52gif-shared PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h52gif-shared SHARED)
target_link_libraries (h52gif-shared PRIVATE ${HDF5_HL_LIBSH_TARGET} PRIVATE ${HDF5_LIBSH_TARGET} ${HDF5_TOOLS_LIBSH_TARGET})
set_target_properties (h52gif-shared PROPERTIES FOLDER tools/hl)
@@ -101,7 +101,7 @@ if (BUILD_TESTING AND HDF5_TEST_SERIAL)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS AND BUILD_STATIC_LIBS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
- target_include_directories (hl_h52gifgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (hl_h52gifgentest PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (hl_h52gifgentest STATIC)
target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
diff --git a/hl/tools/gif2h5/CMakeTests.cmake b/hl/tools/gif2h5/CMakeTests.cmake
index 36ea5f9..b2a8e27 100644
--- a/hl/tools/gif2h5/CMakeTests.cmake
+++ b/hl/tools/gif2h5/CMakeTests.cmake
@@ -28,16 +28,24 @@ HDFTEST_COPY_FILE("${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/testfiles/ex_image2.h5" "$
add_custom_target(gif2h5_files ALL COMMENT "Copying files needed by gif2h5 tests" DEPENDS ${gif2h5_files_list})
# Remove any output file left over from previous test run
+set (HL_TOOLS_CLEANFILES
+ image1.gif
+ image1.h5
+ image.gif
+ image24.gif
+)
add_test (
NAME HL_TOOLS-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- image1.gif
- image1.h5
- image.gif
- image24.gif
+ -E remove ${HL_TOOLS_CLEANFILES}
)
set_tests_properties (HL_TOOLS-clear-objects PROPERTIES FIXTURES_SETUP clear_tools_hl)
+add_test (
+ NAME HL_TOOLS-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_TOOLS_CLEANFILES}
+)
+set_tests_properties (HL_TOOLS-clean-objects PROPERTIES FIXTURES_CLEANUP clear_tools_hl)
add_test (NAME HL_TOOLS_gif2h5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:gif2h5${tgt_file_ext}> testfiles/image1.gif image1.h5)
set_tests_properties (HL_TOOLS_gif2h5 PROPERTIES
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index 6c667c7..9d07a1e 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -12,7 +12,7 @@ set (H5WATCH_SOURCES
if (BUILD_STATIC_LIBS)
add_executable (h5watch ${H5WATCH_SOURCES})
target_compile_options(h5watch PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5watch STATIC)
target_link_libraries (h5watch PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
@@ -21,7 +21,7 @@ endif ()
if (BUILD_SHARED_LIBS)
add_executable (h5watch-shared ${H5WATCH_SOURCES})
target_compile_options(h5watch-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (h5watch-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5watch-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5watch-shared SHARED)
target_link_libraries (h5watch-shared PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${HDF5_TOOLS_LIBSH_TARGET})
set_target_properties (h5watch-shared PROPERTIES FOLDER tools/hl)
@@ -46,7 +46,7 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
)
add_executable (extend_dset ${extend_dset_SOURCES})
target_compile_options(extend_dset PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (BUILD_STATIC_LIBS)
TARGET_C_PROPERTIES (extend_dset STATIC)
target_link_libraries (extend_dset PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
@@ -65,7 +65,7 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
target_compile_options(h5watchgentest PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (BUILD_STATIC_LIBS)
TARGET_C_PROPERTIES (h5watchgentest STATIC)
target_link_libraries (h5watchgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index 32b2b95..a7828b3 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -116,12 +116,6 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
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
- )
- set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- add_test (
NAME H5WATCH-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -134,7 +128,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
set_tests_properties (H5WATCH-${resultfile} PROPERTIES
- DEPENDS H5WATCH-${resultfile}-clear-objects
+ DEPENDS ${last_test}
FIXTURES_REQUIRED gen_test_watch
)
set (last_test "H5WATCH-${resultfile}")
@@ -164,7 +158,12 @@ set_tests_properties (H5WATCH-clearall-objects PROPERTIES FIXTURES_REQUIRED swmr
if (last_test)
set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
-set (last_test "H5WATCH-clearall-objects")
+set (last_test "H5WATCH-cleanall-objects")
+add_test (
+ NAME H5WATCH-cleanall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove WATCH.h5
+)
+set_tests_properties (H5WATCH-cleanall-objects PROPERTIES FIXTURES_CLEANUP swmr_vfd_check_compat)
#################################################################################################
# #
@@ -189,7 +188,7 @@ set (last_test "H5WATCH-clearall-objects")
add_test (NAME H5WATCH-h5watchgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5watchgentest>)
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS "H5WATCH-clearall-objects"
+ DEPENDS H5WATCH-clearall-objects
)
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_SETUP gen_test_watch)
set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_REQUIRED swmr_vfd_check_compat)