summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/ConfigureChecks.cmake15
-rw-r--r--config/cmake/HDF5Tests.c2
-rw-r--r--test/CMakeLists.txt3
3 files changed, 13 insertions, 7 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 8033d53..68137f9 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -8,6 +8,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
+INCLUDE (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
#-----------------------------------------------------------------------------
@@ -127,9 +128,9 @@ ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
SET (WINDOWS)
IF (WIN32)
- IF (NOT UNIX AND NOT CYGWIN)
+ IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
SET (WINDOWS 1)
- ENDIF (NOT UNIX AND NOT CYGWIN)
+ ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
ENDIF (WIN32)
#IF (WIN32)
@@ -519,7 +520,7 @@ MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
)
ENDIF (LARGEFILE)
- # (STATUS "Performing ${OTHER_TEST}")
+ #MESSAGE (STATUS "Performing ${OTHER_TEST}")
TRY_COMPILE (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/HDF5Tests.c
@@ -569,11 +570,11 @@ IF (NOT WINDOWS)
LONE_COLON
)
HDF5_FUNCTION_TEST (${test})
- IF (NOT CYGWIN)
- HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
-# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
- ENDIF (NOT CYGWIN)
ENDFOREACH (test)
+ IF (NOT CYGWIN AND NOT MINGW)
+ HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
+# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
+ ENDIF (NOT CYGWIN AND NOT MINGW)
ENDIF (NOT WINDOWS)
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
index 7fb5756..ea4a648 100644
--- a/config/cmake/HDF5Tests.c
+++ b/config/cmake/HDF5Tests.c
@@ -217,7 +217,9 @@ SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0);
#ifdef HAVE_TIMEZONE
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#include <time.h>
SIMPLE_TEST(timezone=0);
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ca975f9..ba5f1cb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -25,6 +25,9 @@ ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEA
IF (MSVC)
TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
ENDIF (MSVC)
+IF (MINGW)
+ TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "wsock2.lib")
+ENDIF (MINGW)
TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TEST_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})