diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-04-26 21:41:04 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-04-26 21:41:04 (GMT) |
commit | 2347bffaa2d48b62a22575fbc93b1f5c2716d8d4 (patch) | |
tree | 963395e7cd4bd66761194c8cee840906b16abb3a /tools/test | |
parent | bc9a773b994cde788e97e5e998eb5fcd21ec8a39 (diff) | |
download | hdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.zip hdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.tar.gz hdf5-2347bffaa2d48b62a22575fbc93b1f5c2716d8d4.tar.bz2 |
TRILABS-19 remove add_defintions and use generator expressions
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5copy/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/test/h5diff/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/test/h5dump/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/test/h5format_convert/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/test/h5import/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/test/h5jam/CMakeLists.txt | 18 | ||||
-rw-r--r-- | tools/test/h5jam/h5jamgentest.c | 12 | ||||
-rw-r--r-- | tools/test/h5ls/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/test/h5repack/CMakeLists.txt | 24 | ||||
-rw-r--r-- | tools/test/h5stat/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/test/misc/CMakeLists.txt | 24 | ||||
-rw-r--r-- | tools/test/misc/vds/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/test/perform/CMakeLists.txt | 54 |
13 files changed, 99 insertions, 105 deletions
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 583f808..487d9dc 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -6,9 +6,9 @@ project (HDF5_TOOLS_TEST_H5COPY C) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c) - set_property(TARGET h5copygentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") - target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) + target_include_directories(h5copygentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5copygentest STATIC) + target_link_libraries (h5copygentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>) @@ -23,9 +23,9 @@ if (BUILD_SHARED_LIBS) set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c) - set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - 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}") + 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 diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index edab48b..00be8fc 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -6,9 +6,9 @@ project (HDF5_TOOLS_TEST_H5DIFF C) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c) - set_property(TARGET h5diffgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") - target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) + target_include_directories(h5diffgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5diffgentest STATIC) + target_link_libraries (h5diffgentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>) @@ -23,9 +23,9 @@ if (BUILD_SHARED_LIBS) set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) - set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - 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}") + 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 diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index b9f110f..d1d5412 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -9,9 +9,9 @@ set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TO set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c) -set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -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}") +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 @@ -33,9 +33,9 @@ add_custom_command ( # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) - set_property(TARGET h5dumpgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") - target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5dumpgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5dumpgentest STATIC) + target_link_libraries (h5dumpgentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>) diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index 37449f2..516b36b 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -5,16 +5,16 @@ project (HDF5_TOOLS_TEST_H5FC C) # Add the h5format_convert test executables # -------------------------------------------------------------------- add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c) -set_property(TARGET h5fc_chk_idx APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (h5fc_chk_idx STATIC " " " ") -target_link_libraries (h5fc_chk_idx ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5fc_chk_idx PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (h5fc_chk_idx STATIC) +target_link_libraries (h5fc_chk_idx PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools) if (HDF5_BUILD_GENERATORS) add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c) - set_property(TARGET h5fc_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5fc_gentest STATIC " " " ") - target_link_libraries (h5fc_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5fc_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5fc_gentest STATIC) + target_link_libraries (h5fc_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5fc_gentest COMMAND $<TARGET_FILE:h5fc_gentest>) diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index 37029c4..33fa181 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -5,9 +5,9 @@ project (HDF5_TOOLS_TEST_H5IMPORT C) # Add the h5import executables # -------------------------------------------------------------------- add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c) -set_property(TARGET h5importtest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (h5importtest STATIC " " " ") -target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5importtest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (h5importtest STATIC) +target_link_libraries (h5importtest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5importtest PROPERTIES FOLDER tools) include (CMakeTests.cmake) diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index 2f01aa3..38713ba 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -6,24 +6,24 @@ project (HDF5_TOOLS_TEST_H5JAM C) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c) - set_property(TARGET h5jamgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") - target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) + target_include_directories(h5jamgentest PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5jamgentest STATIC) + target_link_libraries (h5jamgentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>) endif () add_executable (getub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/getub.c) -set_property(TARGET getub APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (getub STATIC " " " ") -target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(getub PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (getub STATIC) +target_link_libraries (getub PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/tellub.c) -set_property(TARGET tellub APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (tellub STATIC " " " ") -target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(tellub PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (tellub STATIC) +target_link_libraries (tellub PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) include (CMakeTests.cmake) diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index bd07fb4..1644440 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -270,10 +270,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill) H5Fclose(fid); /* If a user block is being used, write to it here */ - if(ub_size > 0) - { - ssize_t nbytes; - + if(ub_size > 0) { HDassert(ub_size <= BUF_SIZE); fd = HDopen(filename, O_RDWR); @@ -285,8 +282,7 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill) for (u = 0; u < ub_fill; u++) *bp++ = pattern[u % 10]; - nbytes = HDwrite(fd, buf, ub_size); - HDassert(nbytes >= 0); + HDwrite(fd, buf, ub_size); HDclose(fd); } @@ -299,7 +295,6 @@ create_textfile(const char *name, size_t size) int fd; size_t i; char *bp; - ssize_t nbytes; fd = HDcreat(name,0777); HDassert(fd >= 0); @@ -311,8 +306,7 @@ create_textfile(const char *name, size_t size) for(i = 0; i < size; i++) *bp++ = pattern[i % 10]; - nbytes = HDwrite(fd, buf, size); - HDassert(nbytes >= 0); + HDwrite(fd, buf, size); HDfree(buf); diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index 8da3f4d..d6f71eb 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -9,9 +9,9 @@ set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TO set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c) -set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -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}") +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 diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 1381fd7..fa26e90 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -5,9 +5,9 @@ project (HDF5_TOOLS_TEST_H5REPACK C) # Add h5Repack test executables # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) -set_property(TARGET testh5repack_detect_szip APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ") -target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(testh5repack_detect_szip PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC) +target_link_libraries (testh5repack_detect_szip PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) set (REPACK_COMMON_SOURCES @@ -20,9 +20,9 @@ set (REPACK_COMMON_SOURCES ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c ) add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c) -set_property(TARGET h5repacktest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") -target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(h5repacktest PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (h5repacktest STATIC) +target_link_libraries (h5repacktest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) #----------------------------------------------------------------------------- @@ -36,15 +36,15 @@ set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TO set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME}) add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) -set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -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}") +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") add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c) -set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ") -target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(${HDF5_TOOL_PLUGIN_LIB_VTARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED) +target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB") # make plugins dir diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index 3d171fc..59e2fb3 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -6,9 +6,9 @@ project (HDF5_TOOLS_TEST_H5STAT C) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c) - set_property(TARGET h5stat_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") - target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) + target_include_directories(h5stat_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5stat_gentest STATIC) + target_link_libraries (h5stat_gentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>) diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index baf1dea..fbd9c29 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -6,16 +6,16 @@ project (HDF5_TOOLS_TEST_MISC C) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c) - set_property(TARGET h5repart_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") - target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5repart_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5repart_gentest STATIC) + target_link_libraries (h5repart_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>) add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c) - set_property(TARGET h5clear_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ") - target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5clear_gentest STATIC) + target_link_libraries (h5clear_gentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5clear_gentest PROPERTIES FOLDER tools) #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $<TARGET_FILE:h5clear_gentest>) @@ -24,15 +24,15 @@ if (HDF5_BUILD_GENERATORS) endif () add_executable (h5repart_test ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/repart_test.c) -set_property(TARGET h5repart_test APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (h5repart_test STATIC " " " ") -target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5repart_test PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (h5repart_test STATIC) +target_link_libraries (h5repart_test PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c) -set_property(TARGET clear_open_chk APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ") -target_link_libraries (clear_open_chk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(clear_open_chk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (clear_open_chk STATIC) +target_link_libraries (clear_open_chk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (clear_open_chk PROPERTIES FOLDER tools) include (CMakeTestsRepart.cmake) diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index 586be6c..dc7df20 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -3,9 +3,9 @@ project (HDF5_TOOLS_TEST_MISC_VDS C) MACRO (ADD_H5_GENERATOR genfile) add_executable (${genfile} ${HDF5_TOOLS_TEST_MISC_VDS_SOURCE_DIR}/${genfile}.c) - set_property(TARGET ${genfile} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (${genfile} STATIC " " " ") - target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (${genfile} STATIC) + target_link_libraries (${genfile} PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (${genfile} PROPERTIES FOLDER generator/tools) ENDMACRO () diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index b7c9263..7b80c99 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -10,9 +10,9 @@ set (h5perf_serial_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial ${h5perf_serial_SOURCES}) -set_property(TARGET h5perf_serial APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") -target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(h5perf_serial PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (h5perf_serial STATIC) +target_link_libraries (h5perf_serial PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) @@ -22,9 +22,9 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES}) - set_property(TARGET h5perf_serial_alone APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") - target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) + target_include_directories(h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5perf_serial_alone STATIC) + target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_serial_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE @@ -36,9 +36,9 @@ set (chunk_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk.c ) add_executable(chunk ${chunk_SOURCES}) -set_property(TARGET chunk APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (chunk STATIC " " " ") -target_link_libraries(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (chunk STATIC) +target_link_libraries(chunk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) #-- Adding test for iopipe @@ -46,9 +46,9 @@ set (iopipe_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/iopipe.c ) add_executable (iopipe ${iopipe_SOURCES}) -set_property(TARGET iopipe APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (iopipe STATIC " " " ") -target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(iopipe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (iopipe STATIC) +target_link_libraries (iopipe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) #-- Adding test for overhead @@ -56,9 +56,9 @@ set (overhead_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/overhead.c ) add_executable (overhead ${overhead_SOURCES}) -set_property(TARGET overhead APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (overhead STATIC " " " ") -target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) +target_include_directories(overhead PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (overhead STATIC) +target_link_libraries (overhead PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) #-- Adding test for perf_meta @@ -66,9 +66,9 @@ set (perf_meta_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf_meta.c ) add_executable (perf_meta ${perf_meta_SOURCES}) -set_property(TARGET perf_meta APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (perf_meta STATIC " " " ") -target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +target_include_directories(perf_meta PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (perf_meta STATIC) +target_link_libraries (perf_meta PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (perf_meta PROPERTIES FOLDER perform) #-- Adding test for zip_perf @@ -76,9 +76,9 @@ set (zip_perf_SOURCES ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/zip_perf.c ) add_executable (zip_perf ${zip_perf_SOURCES}) -set_property(TARGET zip_perf APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") -TARGET_C_PROPERTIES (zip_perf STATIC " " " ") -target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(zip_perf PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") +TARGET_C_PROPERTIES (zip_perf STATIC) +target_link_libraries (zip_perf PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) if (H5_HAVE_PARALLEL AND BUILD_TESTING) @@ -88,9 +88,9 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf ${h5perf_SOURCES}) - set_property(TARGET h5perf APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5perf STATIC " " " ") - target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(h5perf PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5perf STATIC) + target_link_libraries (h5perf PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) @@ -100,9 +100,9 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SOURCES}) - set_property(TARGET h5perf_alone APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") - TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") - target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + target_include_directories(h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}") + TARGET_C_PROPERTIES (h5perf_alone STATIC) + target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) set_property (TARGET h5perf_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE |