summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-11 18:28:33 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-11 18:28:33 (GMT)
commit1fc1b09bf39c4cfbcb907209a27619e4d1b7bf26 (patch)
tree9a9a6b5ebddf128c5ef0f8148491ae98e9af913e
parentb003ff5b1b35bd87444a22c4be2ea92b20a3d1e4 (diff)
downloadhdf5-1fc1b09bf39c4cfbcb907209a27619e4d1b7bf26.zip
hdf5-1fc1b09bf39c4cfbcb907209a27619e4d1b7bf26.tar.gz
hdf5-1fc1b09bf39c4cfbcb907209a27619e4d1b7bf26.tar.bz2
Fix issues found with ONLY_SHARED_LIBS option
-rw-r--r--CTestConfig.cmake2
-rw-r--r--config/cmake/mccacheinit.cmake4
-rw-r--r--config/cmake/scripts/CTestScript.cmake9
-rw-r--r--tools/lib/h5tools.h28
-rw-r--r--tools/test/h5ls/CMakeTests.cmake2
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake2
6 files changed, 24 insertions, 23 deletions
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 4868d07..1ce5eda 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -42,8 +42,6 @@ set (CTEST_DROP_SITE_CDASH TRUE)
set (UPDATE_TYPE git)
set (VALGRIND_COMMAND "/usr/bin/valgrind")
set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
-set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
-set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index c35f51f..1608202 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -17,8 +17,6 @@
set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
-set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
-
set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
@@ -41,7 +39,7 @@ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index febe109..8425312 100644
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -201,13 +201,18 @@ else ()
set (CTEST_CONFIGURE_ARCHITECTURE "")
endif()
if (LOCAL_MEMCHECK_TEST)
- find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ if(LOCAL_USE_VALGRIND)
+ set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
else ()
if (LOCAL_COVERAGE_TEST)
- find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
+ if(LOCAL_USE_GCOV)
+ find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
+ endif ()
endif ()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 11ba612..dad4af7 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -504,6 +504,19 @@ typedef struct h5tool_format_t {
} h5tool_format_t;
+typedef struct subset_d {
+ hsize_t *data;
+ unsigned int len;
+} subset_d;
+
+/* a structure to hold the subsetting particulars for a dataset */
+struct subset_t {
+ subset_d start;
+ subset_d stride;
+ subset_d count;
+ subset_d block;
+};
+
typedef struct h5tools_context_t {
size_t cur_column; /* current column for output */
size_t cur_elmt; /* current element/output line */
@@ -523,22 +536,9 @@ typedef struct h5tools_context_t {
const struct H5LD_memb_t * const *cmpd_listv; /* h5watch: vector containing info about the list of compound fields to be printed */
struct subset_t *sset; /* subsetting parameters */
int display_index; /* */
- int display_char; /* */
+ int display_char; /* */
} h5tools_context_t;
-typedef struct subset_d {
- hsize_t *data;
- unsigned int len;
-} subset_d;
-
-/* a structure to hold the subsetting particulars for a dataset */
-struct subset_t {
- subset_d start;
- subset_d stride;
- subset_d count;
- subset_d block;
-};
-
/* The following include, h5tools_str.h, must be after the
* above stucts are defined. There is a dependency in the following
* include that hasn't been identified yet. */
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 2f3f3ab..7ff17ff 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -168,7 +168,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 11fa3f2..c947e0e 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -96,7 +96,7 @@
macro (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp> ${ARGN})
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${ARGN})
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects