summaryrefslogtreecommitdiffstats
path: root/utils/tools
diff options
context:
space:
mode:
Diffstat (limited to 'utils/tools')
-rw-r--r--utils/tools/h5dwalk/CMakeLists.txt41
-rw-r--r--utils/tools/test/h5dwalk/CMakeTests.cmake4
2 files changed, 16 insertions, 29 deletions
diff --git a/utils/tools/h5dwalk/CMakeLists.txt b/utils/tools/h5dwalk/CMakeLists.txt
index f0611e0..c520eca 100644
--- a/utils/tools/h5dwalk/CMakeLists.txt
+++ b/utils/tools/h5dwalk/CMakeLists.txt
@@ -4,42 +4,29 @@ project (HDF5_UTILS_TOOLS_H5DWALK C)
# --------------------------------------------------------------------
# Add the h5dwalk and test executables
# --------------------------------------------------------------------
-if (BUILD_STATIC_LIBS)
- add_executable (h5dwalk ${HDF5_UTILS_TOOLS_H5DWALK_SOURCE_DIR}/h5dwalk.c)
-# add_custom_target(generate_demo ALL
-# DEPENDS "${HDF5_TOOLS_ROOT_DIR}/test/demo_destfiles.test"
-# )
- target_include_directories (h5dwalk PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${CIRCLE_INCLUDE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- target_compile_options(h5dwalk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+add_executable (h5dwalk ${HDF5_UTILS_TOOLS_H5DWALK_SOURCE_DIR}/h5dwalk.c)
+#add_custom_target(generate_demo ALL
+# DEPENDS "${HDF5_TOOLS_ROOT_DIR}/test/demo_destfiles.test"
+#)
+target_include_directories (h5dwalk PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${CIRCLE_INCLUDE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(h5dwalk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+if (HDF5_BUILD_STATIC_TOOLS)
TARGET_C_PROPERTIES (h5dwalk STATIC)
target_link_libraries (h5dwalk PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} ${MFU_LIBRARY} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
- set_target_properties (h5dwalk PROPERTIES FOLDER tools)
- set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dwalk")
-
- set (H5_DEP_EXECUTABLES h5dwalk)
+else ()
+ TARGET_C_PROPERTIES (h5dwalk SHARED)
+ target_link_libraries (h5dwalk PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${MFU_LIBRARY} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
endif ()
+set_target_properties (h5dwalk PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dwalk")
-if (BUILD_SHARED_LIBS)
- add_executable (h5dwalk-shared ${HDF5_UTILS_TOOLS_H5DWALK_SOURCE_DIR}/h5dwalk.c)
- target_include_directories (h5dwalk-shared PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${CIRCLE_INCLUDE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- target_compile_options(h5dwalk-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- TARGET_C_PROPERTIES (h5dwalk-shared SHARED)
- target_link_libraries (h5dwalk-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${MFU_LIBRARY} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
- set_target_properties (h5dwalk-shared PROPERTIES FOLDER tools)
- set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dwalk-shared")
-
- set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5dwalk-shared)
-endif ()
+set (H5_DEP_EXECUTABLES h5dwalk)
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (BUILD_STATIC_LIBS)
- clang_format (HDF5_H5DWALK_SRC_FORMAT h5dwalk)
- else ()
- clang_format (HDF5_H5DWALK_SRC_FORMAT h5dwalk-shared)
- endif ()
+ clang_format (HDF5_H5DWALK_SRC_FORMAT h5dwalk)
endif ()
##############################################################################
diff --git a/utils/tools/test/h5dwalk/CMakeTests.cmake b/utils/tools/test/h5dwalk/CMakeTests.cmake
index 6cf2dbe..b65499d 100644
--- a/utils/tools/test/h5dwalk/CMakeTests.cmake
+++ b/utils/tools/test/h5dwalk/CMakeTests.cmake
@@ -29,7 +29,7 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
message("Entered ADD_H5_TEST - 0")
- add_test (NAME H5DWALK-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dwalk${tgt_file_ext}> ${ARGN})
+ add_test (NAME H5DWALK-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dwalk> ${ARGN})
set_tests_properties (H5DWALK-${resultfile} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if ("${resultcode}" STREQUAL "1")
@@ -41,7 +41,7 @@
NAME H5DWALK-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dwalk${tgt_file_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dwalk>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"