summaryrefslogtreecommitdiffstats
path: root/tools/test/h5diff/CMakeTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-06-18 12:46:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-06-18 12:46:25 (GMT)
commite7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360 (patch)
tree18f277bcdb333d7091c598c39b70e4a2e3b50cd0 /tools/test/h5diff/CMakeTests.cmake
parentf73a190d2c2e2bfe80508599e0d76d62c358ae68 (diff)
downloadhdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.zip
hdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.tar.gz
hdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.tar.bz2
HDFFV-10805 Add option to only build shared targets
HDFFV-10805 Add ONLY_SHARED_LIBS option and prefer shared over static HDFFV-10803 Update FindSZIP.cmake find module Remove unneeded modules and update java modules
Diffstat (limited to 'tools/test/h5diff/CMakeTests.cmake')
-rw-r--r--tools/test/h5diff/CMakeTests.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 6bce3f7..bbde8f4 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -343,6 +343,12 @@
endif ()
add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
+ if (NOT BUILD_SHARED_LIBS)
+ set (tgt_ext "")
+ else ()
+ set (tgt_ext "-shared")
+ endif ()
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -352,7 +358,7 @@
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff${tgt_ext}> ${ARGN})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -375,7 +381,7 @@
add_test (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"