Commit 76855160 authored by T.J. Corona's avatar T.J. Corona

Local hdf5 for windows

parent 931467a2
Pipeline #133363 running with stage
include("${CMAKE_CURRENT_LIST_DIR}/../hdf5.cmake")
# On Windows, find_package(HDF5) with cmake 2.8.[8,9] always ends up finding
# the dlls instead of the libs. So setting the variables explicitly for
# dependent projects.
superbuild_add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
-DHDF5_HL_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5_hl.lib
# This variable is for CGNS, since CGNS doesn't use standard find_package()
# to find hdf5.
-DHDF5_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
# These variables are for netcdf
-DHDF5_LIB:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
-DHDF5_HL_LIB:FILEPATH=<INSTALL_DIR>/lib/hdf5_hl.lib
-DHDF5_INCLUDE_DIR:FILEPATH=<INSTALL_DIR>/include)
if (NOT superbuild_is_64bit)
# On 32-bit Windows, H5public.h ends up redefining ssize_t. This patch ensures
# that the old definition is undef-ed before redefining it.
superbuild_apply_patch(hdf5 fix-ssize_t-redefine
"Fix ssize_t redefinition on 32-bit Windows")
endif ()
if (MSVC)
# hdf5 has a bug with MSVC compiler where it doesn't realize its using MSVC
# compiler when using nmake or ninja generators. This patch fixes that.
superbuild_apply_patch(hdf5 msvc-non-vs-generator
"Fix MSVC detection with Makefiles and Ninja generators")
# VS2015 support
superbuild_apply_patch(hdf5 vs2015-support
"Support Visual Studio 2015")
endif ()
diff -u -Nru5 hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake hdf5-1.10.3.msvc-non-vs-generator/config/cmake_ext_mod/ConfigureChecks.cmake
--- hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.msvc-non-vs-generator/config/cmake_ext_mod/ConfigureChecks.cmake 2019-03-14 10:08:32.051965687 -0400
@@ -62,15 +62,10 @@
# WINDOWS Hard code Values
# ----------------------------------------------------------------------
set (WINDOWS)
if (WIN32)
- 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")
- endif ()
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
if (NOT UNIX AND NOT MINGW)
set (WINDOWS 1)
set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
@@ -86,13 +81,11 @@
set (${HDF_PREFIX}_HAVE_SYS_TYPES_H 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
set (${HDF_PREFIX}_HAVE_SYSTEM 1)
set (${HDF_PREFIX}_HAVE_LONGJMP 1)
- if (NOT MINGW)
- set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
- endif ()
+ set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
endif ()
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
diff -u -Nru5 hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake hdf5-1.10.3.vs2015-support/config/cmake_ext_mod/ConfigureChecks.cmake
--- hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.vs2015-support/config/cmake_ext_mod/ConfigureChecks.cmake 2019-03-14 10:09:36.891964526 -0400
@@ -94,11 +94,13 @@
if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
endif ()
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
- set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ if (NOT MSVC14)
+ set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ endif ()
set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
if (MINGW)
set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
endif ()
set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment