diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-08-28 15:19:25 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-08-28 15:19:25 (GMT) |
commit | 6fd9deaf78c5c91d0fbd62ecab37506428cd9a6d (patch) | |
tree | 5f5069cf0e2700cd85f4f62353e816ab92c809c7 | |
parent | 70456e13139b8e5fbbfb06a64acc5db40dc5cdac (diff) | |
download | hdf5-6fd9deaf78c5c91d0fbd62ecab37506428cd9a6d.zip hdf5-6fd9deaf78c5c91d0fbd62ecab37506428cd9a6d.tar.gz hdf5-6fd9deaf78c5c91d0fbd62ecab37506428cd9a6d.tar.bz2 |
fix get gethostname for windows
-rw-r--r-- | test/h5test.c | 2 | ||||
-rw-r--r-- | testpar/CMakeLists.txt | 4 | ||||
-rw-r--r-- | testpar/CMakeTests.cmake | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/test/h5test.c b/test/h5test.c index 1fb77c1..3cc2c35 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1082,7 +1082,7 @@ h5_show_hostname(void) #endif #ifdef H5_HAVE_GETHOSTNAME - if (gethostname(hostname, (size_t)80) < 0) + if (HDgethostname(hostname, (size_t)80) < 0) HDprintf(" gethostname failed\n"); else HDprintf(" hostname=%s\n", hostname); diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 1aecef6..51c3420 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -47,11 +47,13 @@ MACRO (ADD_H5P_EXE file) TARGET_C_PROPERTIES (${file} STATIC) target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" + $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> ) else () TARGET_C_PROPERTIES (${file} SHARED) target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" + $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> ) endif () set_target_properties (${file} PROPERTIES FOLDER test/par) @@ -61,7 +63,7 @@ set (H5P_TESTS t_mpi t_bigio t_cache - #t_cache_image + t_cache_image t_pflush1 t_pflush2 t_pread diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index ad244b5..5848c60 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -72,6 +72,9 @@ endforeach () # list (REMOVE_ITEM H5P_TESTS t_shapesame) #endif () +# do not test until new version is added +list (REMOVE_ITEM H5P_TESTS t_cache_image) + set (test_par_CLEANFILES t_cache_image_00.h5 t_cache_image_01.h5 |