summaryrefslogtreecommitdiffstats
path: root/tools/test/h5diff
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-22 15:23:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-22 15:23:16 (GMT)
commite96ef71034fbeadcf2ed244b15a14b7151529d29 (patch)
tree0b07ebf5d12fc46ebfb5ae353a3d0ebad5033a85 /tools/test/h5diff
parente1e63edd359e3753c374440bdb295010c348e9bc (diff)
downloadhdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.zip
hdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.tar.gz
hdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.tar.bz2
HDFFV-9739 and cmake improvements merge from develop
Diffstat (limited to 'tools/test/h5diff')
-rw-r--r--tools/test/h5diff/CMakeLists.txt35
1 files changed, 15 insertions, 20 deletions
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index dd7da66..c0aac36 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -1,22 +1,18 @@
cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_TOOLS_TEST_H5DIFF)
+project (HDF5_TOOLS_TEST_H5DIFF C)
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
+# --------------------------------------------------------------------
+# Add the h5diff and test executables
+# --------------------------------------------------------------------
+if (HDF5_BUILD_GENERATORS)
+ add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
+ target_include_directories(h5diffgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (h5diffgentest STATIC)
+ target_link_libraries (h5diffgentest PRIVATE ${HDF5_LIB_TARGET})
+ set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
- # --------------------------------------------------------------------
- # Add the h5diff and test executables
- # --------------------------------------------------------------------
- if (HDF5_BUILD_GENERATORS)
- add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
- TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ")
- target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
- set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
-
- #add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
- endif ()
+ #add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
+endif ()
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
@@ -25,12 +21,11 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c)
- TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ target_include_directories(${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED)
+ target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
# make plugins dir