summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-12 20:04:59 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-17 16:58:02 (GMT)
commitd586a457b2c3d0377b8752a6ce9b621a5994f56e (patch)
treeda249709b453f6e6ee278fc1c69178b473012075 /config
parent7a9c852c2c1be7fd0b7c3a97b3e7f81227b35b43 (diff)
downloadhdf5-d586a457b2c3d0377b8752a6ce9b621a5994f56e.zip
hdf5-d586a457b2c3d0377b8752a6ce9b621a5994f56e.tar.gz
hdf5-d586a457b2c3d0377b8752a6ce9b621a5994f56e.tar.bz2
HDFFV-10845 C_FLAGS need set correctly for win32 vs mingw
Diffstat (limited to 'config')
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index a951429..8c00f52 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -21,6 +21,9 @@ include (CheckTypeSize)
include (CheckVariableExists)
include (TestBigEndian)
+set (HDF_EXTRA_C_FLAGS)
+set (HDF_EXTRA_FLAGS)
+
#-----------------------------------------------------------------------------
# APPLE/Darwin setup
#-----------------------------------------------------------------------------
@@ -66,12 +69,16 @@ set (WINDOWS)
if (MINGW)
set (${HDF_PREFIX}_HAVE_MINGW 1)
set (WINDOWS 1) # MinGW tries to imitate Windows
+ set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
+ set (HDF_EXTRA_C_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
endif ()
if (WIN32)
if (NOT UNIX)
set (WINDOWS 1)
+ set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
+ set (HDF_EXTRA_C_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
if (MSVC)
set (${HDF_PREFIX}_HAVE_VISUAL_STUDIO 1)
endif ()
@@ -79,7 +86,6 @@ if (WIN32)
endif ()
if (WINDOWS)
- set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (${HDF_PREFIX}_HAVE_STDDEF_H 1)
@@ -260,8 +266,6 @@ HDF_FUNCTION_TEST (STDC_HEADERS)
# The linux-lfs option is deprecated.
set (LINUX_LFS 0)
-set (HDF_EXTRA_C_FLAGS)
-set (HDF_EXTRA_FLAGS)
if (NOT WINDOWS)
# Might want to check explicitly for Linux and possibly Cygwin
# instead of checking for not Solaris or Darwin.