Commit 8e7b453e authored by Ben Boeckel's avatar Ben Boeckel

hdf5: update patch from paraview

parent 4bbdc11b
......@@ -16,3 +16,15 @@ add_external_project(
LOG_BUILD 1
LOG_INSTALL 1
)
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.
add_external_project_step(hdf5-patch-detect-msvc
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/hdf5.config.cmake.ConfigureChecks.cmake
<SOURCE_DIR>/config/cmake/ConfigureChecks.cmake
DEPENDEES update # do after update
DEPENDERS patch # do before patch
)
endif()
......@@ -23,27 +23,26 @@ if (MSVC)
)
endif()
if (WIN32)
# 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.
add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=${install_location}/lib/hdf5dll.lib
-DHDF5_HL_LIBRARY:FILEPATH=${install_location}/lib/hdf5_hldll.lib
# This variable is for CGNS, since CGNS doesn't use standard find_package()
# to find hdf5.
-DHDF5_LIBRARY:FILEPATH=${install_location}/lib/hdf5dll.lib
)
# 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.
add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
-DHDF5_HL_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5_hl.lib
-DHDF5_LIBRARIES:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib${ep_list_separator}<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
)
# On 32-bit Windows, H5public.h ends up redefining ssize_t. This patch ensures
# that the old definition is undef-ed before redefining it.
if (NOT 64bit_build)
add_external_project_step(patch_fix_h5public
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/hdf5.src.H5public.h
<SOURCE_DIR>/src/H5public.h
DEPENDEES update # do after update
DEPENDERS patch # do before patch
)
endif()
# On 32-bit Windows, H5public.h ends up redefining ssize_t. This patch ensures
# that the old definition is undef-ed before redefining it.
if (NOT 64bit_build)
add_external_project_step(patch_fix_h5public
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/hdf5.src.H5public.h
<SOURCE_DIR>/src/H5public.h
DEPENDEES update # do after update
DEPENDERS patch # do before patch
)
endif()
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