summaryrefslogtreecommitdiffstats
path: root/hl/tools
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 /hl/tools
parente1e63edd359e3753c374440bdb295010c348e9bc (diff)
downloadhdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.zip
hdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.tar.gz
hdf5-e96ef71034fbeadcf2ed244b15a14b7151529d29.tar.bz2
HDFFV-9739 and cmake improvements merge from develop
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/CMakeLists.txt2
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt20
-rw-r--r--hl/tools/h5watch/CMakeLists.txt28
3 files changed, 24 insertions, 26 deletions
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 67e0ccb..c2889c3 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TOOLS C CXX)
+project (HDF5_HL_TOOLS C)
add_subdirectory (gif2h5)
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 2697dfd..a27ab18 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TOOLS_GIF2H5)
+project (HDF5_HL_TOOLS_GIF2H5 C)
#-----------------------------------------------------------------------------
# Define Sources
@@ -14,12 +14,10 @@ set (GIF2H5_SOURCES
)
#-- Add gif2hdf5 program
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
-INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR})
-
add_executable (gif2h5 ${GIF2H5_SOURCES})
-TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
-target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(gif2h5 PRIVATE "${HDF5_SRC_DIR};${HDF5_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)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
@@ -29,8 +27,9 @@ set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
add_executable (h52gif ${hdf2gif_SOURCES})
-TARGET_C_PROPERTIES (h52gif STATIC " " " ")
-target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h52gif PRIVATE "${HDF5_SRC_DIR};${HDF5_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)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
@@ -42,8 +41,9 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
- TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ")
- target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(hl_h52gifgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_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)
# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index 5de655e..1d1c341 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_HL_TOOLS_H5WATCH)
+project (HDF5_HL_TOOLS_H5WATCH C)
#-----------------------------------------------------------------------------
# Define Sources
@@ -9,25 +9,21 @@ set (H5WATCH_SOURCES
)
#-- Add h5watch program
-include_directories (${HDF5_TOOLS_DIR}/lib)
-include_directories (${HDF5_HL_TOOLS_DIR}/src)
-include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR})
-
add_executable (h5watch ${H5WATCH_SOURCES})
-TARGET_C_PROPERTIES (h5watch STATIC " " " ")
-target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_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)
if (BUILD_TESTING)
- include_directories (${HDF5_TEST_SRC_DIR})
- include_directories(${HDF5_HL_SRC_DIR}/test)
#-- 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_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ")
- target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ target_include_directories(hl_swmr_check_compat_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC)
+ target_link_libraries (hl_swmr_check_compat_vfd PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
#-- Add extend_dset program
@@ -35,13 +31,15 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
)
add_executable (extend_dset ${extend_dset_SOURCES})
- TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
- target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ target_include_directories(extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ 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})
set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
- TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ")
- target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (h5watchgentest STATIC)
+ target_link_libraries (h5watchgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)
include (CMakeTests.cmake)