summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
commitea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42 (patch)
treee71e1c6ffd6b6b4126ed232402beb5a80e5335d9 /tools/src
parente6bc326ec0c417ef7b003da535b2e071442d2067 (diff)
parentdcc66a4f157ace0858b788228550f3e104df3242 (diff)
downloadhdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.zip
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.gz
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'dcc66a4f157ace0858b788228550f3e104df3242': (35 commits) GGC requires attribute before function Correct COMPILE defs usage Add missing module_dir property Text cleanup Correct sentence punctuation. Add release note. Use set_property for MT flag Correct command usage Remove APPEND Fix typo Add missing test lib add missing folder to path Fix another command revert Missed a command revert Revert to old style for LINK_FLAGS gen expr not working LINK_FLAGS must be separate property sets Fix link flags syntax Revert refactor link flags refactor link flags to interface Refactor link flags ...
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5copy/CMakeLists.txt12
-rw-r--r--tools/src/h5diff/CMakeLists.txt18
-rw-r--r--tools/src/h5dump/CMakeLists.txt12
-rw-r--r--tools/src/h5format_convert/CMakeLists.txt6
-rw-r--r--tools/src/h5import/CMakeLists.txt6
-rw-r--r--tools/src/h5jam/CMakeLists.txt12
-rw-r--r--tools/src/h5jam/h5jam.c43
-rw-r--r--tools/src/h5jam/h5unjam.c17
-rw-r--r--tools/src/h5ls/CMakeLists.txt12
-rw-r--r--tools/src/h5repack/CMakeLists.txt12
-rw-r--r--tools/src/h5stat/CMakeLists.txt12
-rw-r--r--tools/src/misc/CMakeLists.txt24
12 files changed, 81 insertions, 105 deletions
diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt
index 9fe6a5f..500484e 100644
--- a/tools/src/h5copy/CMakeLists.txt
+++ b/tools/src/h5copy/CMakeLists.txt
@@ -5,9 +5,9 @@ project (HDF5_TOOLS_SRC_H5COPY C)
# Add the h5copy and test executables
# --------------------------------------------------------------------
add_executable (h5copy ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c)
-set_property(TARGET h5copy APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5copy STATIC " " " ")
-target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5copy PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5copy STATIC)
+target_link_libraries (h5copy PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5copy PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy")
@@ -15,9 +15,9 @@ set (H5_DEP_EXECUTABLES h5copy)
if (BUILD_SHARED_LIBS)
add_executable (h5copy-shared ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c)
- set_property(TARGET h5copy-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5copy-shared SHARED " " " ")
- target_link_libraries (h5copy-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5copy-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5copy-shared SHARED)
+ target_link_libraries (h5copy-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5copy-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy-shared")
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index fd8ede3..3d9b3e0 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -8,9 +8,9 @@ add_executable (h5diff
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
-set_property(TARGET h5diff APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5diff STATIC " " " ")
-target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5diff STATIC)
+target_link_libraries (h5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff")
@@ -21,9 +21,9 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
- set_property(TARGET h5diff-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5diff-shared SHARED " " " ")
- target_link_libraries (h5diff-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5diff-shared SHARED)
+ target_link_libraries (h5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5diff-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff-shared")
@@ -35,9 +35,9 @@ if (H5_HAVE_PARALLEL)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
- set_property(TARGET ph5diff APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (ph5diff STATIC " " " ")
- target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (ph5diff STATIC)
+ target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>)
set_target_properties (ph5diff PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff")
endif ()
diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt
index 6f74ac6..1d15759 100644
--- a/tools/src/h5dump/CMakeLists.txt
+++ b/tools/src/h5dump/CMakeLists.txt
@@ -9,9 +9,9 @@ add_executable (h5dump
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
-set_property(TARGET h5dump APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5dump STATIC " " " ")
-target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5dump PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5dump STATIC)
+target_link_libraries (h5dump PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump")
@@ -23,9 +23,9 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
- set_property(TARGET h5dump-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ")
- target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5dump-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5dump-shared SHARED)
+ target_link_libraries (h5dump-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5dump-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump-shared")
diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt
index beebeac..914d05b 100644
--- a/tools/src/h5format_convert/CMakeLists.txt
+++ b/tools/src/h5format_convert/CMakeLists.txt
@@ -5,9 +5,9 @@ project (HDF5_TOOLS_SRC_H5FC C)
# Add the h5format_convert executables
# --------------------------------------------------------------------
add_executable (h5format_convert ${HDF5_TOOLS_SRC_H5FC_SOURCE_DIR}/h5format_convert.c)
-set_property(TARGET h5format_convert APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5format_convert STATIC " " " ")
-target_link_libraries (h5format_convert ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5format_convert PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5format_convert STATIC)
+target_link_libraries (h5format_convert PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5format_convert PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5format_convert")
diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt
index d79c4f8..7874e33 100644
--- a/tools/src/h5import/CMakeLists.txt
+++ b/tools/src/h5import/CMakeLists.txt
@@ -5,9 +5,9 @@ project (HDF5_TOOLS_SRC_H5IMPORT C)
# Add the h5import executables
# --------------------------------------------------------------------
add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c)
-set_property(TARGET h5import APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5import STATIC " " " ")
-target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5import PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5import STATIC)
+target_link_libraries (h5import PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
#set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT)
set_target_properties (h5import PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5import")
diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt
index c40405b..87062b6 100644
--- a/tools/src/h5jam/CMakeLists.txt
+++ b/tools/src/h5jam/CMakeLists.txt
@@ -5,16 +5,16 @@ project (HDF5_TOOLS_SRC_H5JAM C)
# Add the h5jam executables
# --------------------------------------------------------------------
add_executable (h5jam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5jam.c)
-set_property(TARGET h5jam APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5jam STATIC " " " ")
-target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5jam PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5jam STATIC)
+target_link_libraries (h5jam PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5jam PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5jam")
add_executable (h5unjam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5unjam.c)
-set_property(TARGET h5unjam APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5unjam STATIC " " " ")
-target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5unjam PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5unjam STATIC)
+target_link_libraries (h5unjam PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5unjam PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5unjam")
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index cc5fcdc..01ba4af 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -56,11 +56,6 @@ static struct long_options l_opts[] = {
* Purpose: Print the usage message
*
* Return: void
- *
- * Programmer:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
@@ -120,7 +115,6 @@ usage (const char *prog)
* Purpose: Shutdown and call exit()
*
* Return: Does not return
- *
*-------------------------------------------------------------------------
*/
static void
@@ -144,13 +138,7 @@ leave(int ret)
* Purpose: Parse the command line for the h5dumper.
*
* Return: Success:
- *
* Failure: Exits program with EXIT_FAILURE value.
- *
- * Programmer:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -199,7 +187,6 @@ parse_command_line (int argc, const char *argv[])
*
* Return: Success: 0
* Failure: 1
- *
*-------------------------------------------------------------------------
*/
int
@@ -238,7 +225,7 @@ main (int argc, const char *argv[])
if (ub_file == NULL) {
/* no user block */
- error_msg("missing arguemnt for -u <user_file>.\n");
+ error_msg("missing argument for -u <user_file>.\n");
help_ref_msg(stderr);
leave (EXIT_FAILURE);
}
@@ -252,7 +239,7 @@ main (int argc, const char *argv[])
}
if (input_file == NULL) {
- error_msg("missing arguemnt for -i <HDF5 file>.\n");
+ error_msg("missing argument for -i <HDF5 file>.\n");
help_ref_msg(stderr);
leave (EXIT_FAILURE);
}
@@ -419,7 +406,6 @@ main (int argc, const char *argv[])
*
* Return: Success: last byte written in the output.
* Failure: Exits program with EXIT_FAILURE value.
- *
*-------------------------------------------------------------------------
*/
hsize_t
@@ -451,7 +437,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout,
} /* end if */
howmuch = (ssize_t)sbuf.st_size;
- } else {
+ }
+ else {
howmuch = limit;
} /* end if */
@@ -464,7 +451,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout,
if (howmuch > 512) {
to = toend - 512;
from = fromend - 512;
- } else {
+ }
+ else {
to = toend - howmuch;
from = fromend - howmuch;
} /* end if */
@@ -475,7 +463,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout,
if (howmuch > 512) {
nchars = HDread(infid, buf, (unsigned) 512);
- } else {
+ }
+ else {
nchars = HDread(infid, buf, (unsigned)howmuch);
} /* end if */
@@ -494,7 +483,8 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout,
if(howmuch > 512) {
to -= nchars;
from -= nchars;
- } else {
+ }
+ else {
to -= howmuch;
from -= howmuch;
} /* end if */
@@ -508,15 +498,11 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout,
* Function: compute_user_block_size
*
* Purpose: Find the offset of the HDF5 header after the user block:
- * align at 0, 512, 1024, etc.
- * ublock_size: the size of the user block (bytes).
+ * align at 0, 512, 1024, etc.
+ * ublock_size: the size of the user block (bytes).
*
- * Return: Success: the location of the header == the size of the
- * padded user block.
+ * Return: Success: the location of the header == the size of the padded user block.
* Failure: none
- *
- * Return: Success: last byte written in the output.
- * Failure: Exits program with EXIT_FAILURE value.
*-------------------------------------------------------------------------
*/
H5_ATTR_CONST hsize_t
@@ -533,11 +519,12 @@ compute_user_block_size(hsize_t ublock_size)
return where;
} /* end compute_user_block_size() */
-/*
+/*-------------------------------------------------------------------------
* Write zeroes to fill the file from 'where' to 512, 1024, etc. bytes.
*
* Sets new_where to the size of the padded file and
* returns SUCCEED/FAIL.
+ *-------------------------------------------------------------------------
*/
herr_t
write_pad(int ofile, hsize_t old_where, hsize_t *new_where)
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index 4e9798e..ffe2aca 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -56,11 +56,6 @@ static struct long_options l_opts[] = {
* Purpose: Print the usage message
*
* Return: void
- *
- * Programmer:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
@@ -124,9 +119,7 @@ usage(const char *prog)
* Purpose: Parse the command line for the h5dumper.
*
* Return: Success: EXIT_SUCCESS;
- *
* Failure: Exits function with EXIT_FAILURE value.
- *
*-------------------------------------------------------------------------
*/
static int
@@ -199,11 +192,6 @@ done:
*
* Return: Success: 0
* Failure: 1
- *
- * Programmer:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -235,7 +223,7 @@ main(int argc, const char *argv[])
if (input_file == NULL) {
/* no user block */
- error_msg("missing arguemnt for HDF5 file input.\n");
+ error_msg("missing argument for HDF5 file input.\n");
help_ref_msg(stderr);
h5tools_setstatus(EXIT_FAILURE);
goto done;
@@ -336,11 +324,12 @@ done:
return h5tools_getstatus();
}
-/*
+/*-------------------------------------------------------------------------
* Copy 'how_much' bytes from the input file to the output file,
* starting at byte 'where' in the input file.
*
* Returns 0 on success, -1 on failure.
+ *-------------------------------------------------------------------------
*/
herr_t
copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much )
diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt
index af3a552..d72b43e 100644
--- a/tools/src/h5ls/CMakeLists.txt
+++ b/tools/src/h5ls/CMakeLists.txt
@@ -5,9 +5,9 @@ project (HDF5_TOOLS_SRC_H5LS C)
# Add the h5ls executable
#-----------------------------------------------------------------------------
add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
-set_property(TARGET h5ls APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5ls STATIC " " " ")
-target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5ls PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5ls STATIC)
+target_link_libraries (h5ls PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls")
@@ -15,9 +15,9 @@ set (H5_DEP_EXECUTABLES h5ls)
if (BUILD_SHARED_LIBS)
add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
- set_property(TARGET h5ls-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ")
- target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5ls-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5ls-shared SHARED)
+ target_link_libraries (h5ls-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5ls-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls-shared")
diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt
index 631b426..e4faa37 100644
--- a/tools/src/h5repack/CMakeLists.txt
+++ b/tools/src/h5repack/CMakeLists.txt
@@ -15,9 +15,9 @@ set (REPACK_COMMON_SOURCES
)
add_executable (h5repack ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c)
-set_property(TARGET h5repack APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5repack STATIC " " " ")
-target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5repack PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5repack STATIC)
+target_link_libraries (h5repack PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repack PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack")
@@ -25,9 +25,9 @@ set (H5_DEP_EXECUTABLES h5repack)
if (BUILD_SHARED_LIBS)
add_executable (h5repack-shared ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c)
- set_property(TARGET h5repack-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ")
- target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5repack-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5repack-shared SHARED)
+ target_link_libraries (h5repack-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5repack-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack-shared")
diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt
index 2f7e957..810d916 100644
--- a/tools/src/h5stat/CMakeLists.txt
+++ b/tools/src/h5stat/CMakeLists.txt
@@ -5,9 +5,9 @@ project (HDF5_TOOLS_SRC_H5STAT C)
# Add the h5stat executables
# --------------------------------------------------------------------
add_executable (h5stat ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c)
-set_property(TARGET h5stat APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5stat STATIC " " " ")
-target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5stat PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5stat STATIC)
+target_link_libraries (h5stat PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5stat PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat")
@@ -15,9 +15,9 @@ set (H5_DEP_EXECUTABLES h5stat)
if (BUILD_SHARED_LIBS)
add_executable (h5stat-shared ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c)
- set_property(TARGET h5stat-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ")
- target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_include_directories(h5stat-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5stat-shared SHARED)
+ target_link_libraries (h5stat-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5stat-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat-shared")
diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt
index 021912e..45b38c1 100644
--- a/tools/src/misc/CMakeLists.txt
+++ b/tools/src/misc/CMakeLists.txt
@@ -6,30 +6,30 @@ project (HDF5_TOOLS_SRC_MISC C)
# --------------------------------------------------------------------
#-- Misc Executables
add_executable (h5debug ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5debug.c)
-set_property(TARGET h5debug APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5debug STATIC " " " ")
-target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h5debug PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5debug STATIC)
+target_link_libraries (h5debug PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5debug PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5debug")
add_executable (h5repart ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5repart.c)
-set_property(TARGET h5repart APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5repart STATIC " " " ")
-target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h5repart PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5repart STATIC)
+target_link_libraries (h5repart PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repart")
add_executable (h5mkgrp ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5mkgrp.c)
-set_property(TARGET h5mkgrp APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ")
-target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5mkgrp PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5mkgrp STATIC)
+target_link_libraries (h5mkgrp PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5mkgrp")
add_executable (h5clear ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5clear.c)
-set_property(TARGET h5clear APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5clear STATIC " " " ")
-target_link_libraries (h5clear ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_include_directories(h5clear PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5clear STATIC)
+target_link_libraries (h5clear PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5clear PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5clear")