Skip to content

Commit

Permalink
Rework CMake add_custom to use the BYPRODUCTS argument
Browse files Browse the repository at this point in the history
Update pkgconfig scripts for parallel builds.
Fix install COPYING file reference.
Remove unused round defines.
Change CMake default setting of BUILD_CPP to off.
  • Loading branch information
byrnHDF committed Apr 28, 2021
1 parent 7597339 commit 2a492af
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 143 deletions.
3 changes: 1 addition & 2 deletions CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
if (WIN32)
Expand Down Expand Up @@ -259,9 +258,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif ()
set (CPACK_PACKAGE_RELOCATABLE TRUE)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ endif ()
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON)
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
Expand Down
6 changes: 5 additions & 1 deletion c++/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5c++
Expand Down
27 changes: 0 additions & 27 deletions config/cmake/H5pubconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,9 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@

/* Define to 1 if you have the `llround' function. */
#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@

/* Define to 1 if you have the `llroundf' function. */
#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@

/* Define to 1 if you have the `longjmp' function. */
#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@

/* Define to 1 if you have the `lround' function. */
#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@

/* Define to 1 if you have the `lroundf' function. */
#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@

/* Define to 1 if you have the `lseek64' function. */
#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@

Expand Down Expand Up @@ -322,12 +310,6 @@
compiled */
#cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@

/* Define to 1 if you have the `round' function. */
#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@

/* Define to 1 if you have the `roundf' function. */
#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@

/* Define to 1 if you have the `setjmp' function. */
#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@

Expand Down Expand Up @@ -778,18 +760,9 @@
/* Define for large files, on AIX-style hosts. */
#cmakedefine H5__LARGE_FILES

/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine H5_const

/* Define to `long int' if <sys/types.h> does not define. */
#cmakedefine H5_off_t

/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine H5_ptrdiff_t

/* Define to `unsigned long' if <sys/types.h> does not define. */
#cmakedefine H5_size_t

/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine H5_ssize_t

Expand Down
2 changes: 2 additions & 0 deletions config/cmake/cacheinit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)

set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)

set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build C++ support" FORCE)

set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)

set (HDF5_INSTALL_MOD_FORTRAN "NO" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" FORCE)
Expand Down
6 changes: 0 additions & 6 deletions config/cmake_ext_mod/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -500,18 +500,12 @@ CHECK_FUNCTION_EXISTS (frexpl ${HDF_PREFIX}_HAVE_FREXPL)

CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
CHECK_FUNCTION_EXISTS (llround ${HDF_PREFIX}_HAVE_LLROUND)
CHECK_FUNCTION_EXISTS (llroundf ${HDF_PREFIX}_HAVE_LLROUNDF)
CHECK_FUNCTION_EXISTS (lround ${HDF_PREFIX}_HAVE_LROUND)
CHECK_FUNCTION_EXISTS (lroundf ${HDF_PREFIX}_HAVE_LROUNDF)
CHECK_FUNCTION_EXISTS (lstat ${HDF_PREFIX}_HAVE_LSTAT)

CHECK_FUNCTION_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
CHECK_FUNCTION_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND)
CHECK_FUNCTION_EXISTS (roundf ${HDF_PREFIX}_HAVE_ROUNDF)
CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO)

CHECK_FUNCTION_EXISTS (signal ${HDF_PREFIX}_HAVE_SIGNAL)
Expand Down
62 changes: 36 additions & 26 deletions fortran/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,38 +73,35 @@ add_executable (H5match_types
)
target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")

add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/H5fortran_types.F90
add_custom_command (TARGET H5match_types POST_BUILD
BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5match_types>
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5match_types
)

if (NOT ONLY_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
add_custom_command (TARGET H5match_types POST_BUILD
BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
endif ()
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
add_custom_command (TARGET H5match_types POST_BUILD
BYPRODUCTS H5f90i_gen.h H5fortran_types.F90
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
Expand Down Expand Up @@ -137,10 +134,19 @@ set (f90CStub_C_HDRS
# generated files
${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
)
add_custom_target (H5gen_i ALL
DEPENDS H5match_types ${f90CStub_C_HDRS}
)
set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES GENERATED TRUE)

set (f90CStub_C_SHHDRS
# generated files
${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
add_custom_target (H5gen_iSH ALL
DEPENDS H5match_types ${f90CStub_C_SHHDRS}
)
set_source_files_properties (${f90CStub_C_SHHDRS} PROPERTIES GENERATED TRUE)

if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
Expand Down Expand Up @@ -210,39 +216,39 @@ set (f90_F_GEN_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90
)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90
add_custom_command (TARGET H5_buildiface POST_BUILD
BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_buildiface>
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS ${f90_F_GEN_SOURCES}
COMMENT "Generating the H5_gen.F90 file"
)
if (NOT ONLY_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
add_custom_command (TARGET H5_buildiface POST_BUILD
BYPRODUCTS H5_gen.F90
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/static/H5_gen.F90"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 file"
)
add_custom_target (H5gen ALL
DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE)
endif ()

if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
add_custom_command (TARGET H5_buildiface POST_BUILD
BYPRODUCTS H5_gen.F90
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90"
ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90
COMMENT "Generating the H5_gen.F90 shared file"
)
add_custom_target (H5genSH ALL
DEPENDS ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90
)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
Expand Down Expand Up @@ -550,7 +556,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5fc
Expand Down
14 changes: 7 additions & 7 deletions fortran/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,27 @@ if (HDF5_ENABLE_FORMATTERS)
endif ()

if (NOT BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
add_custom_command (TARGET H5_test_buildiface POST_BUILD
BYPRODUCTS tf_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_test_buildiface>
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 file"
COMMENT "Generating the tf_gen.F90 static file"
)
add_custom_target (H5testgen ALL
DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
)
set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
else ()
add_custom_command (
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
add_custom_command (TARGET H5_test_buildiface POST_BUILD
BYPRODUCTS tf_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5_test_buildiface>
WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 shared file"
)
add_custom_target (H5testgenSH ALL
DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
)
set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
Expand Down
6 changes: 5 additions & 1 deletion hl/c++/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++
Expand Down
18 changes: 11 additions & 7 deletions hl/fortran/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ set (HDF5_HL_F90_F_BASE_SOURCES
)

if (NOT ONLY_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
add_custom_command (TARGET H5HL_buildiface POST_BUILD
BYPRODUCTS $H5LTff_gen.F90 H5TBff_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5HL_buildiface>
WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files"
)
add_custom_target (H5HLgen ALL
DEPENDS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
)
set_source_files_properties (
${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90
Expand All @@ -131,15 +131,15 @@ if (NOT ONLY_SHARED_LIBS)
)
endif ()
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
add_custom_command (TARGET H5HL_buildiface POST_BUILD
BYPRODUCTS H5LTff_gen.F90 H5TBff_gen.F90
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5HL_buildiface>
WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files"
)
add_custom_target (H5HLgenSH ALL
DEPENDS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
)
set_source_files_properties (
${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90
Expand Down Expand Up @@ -353,7 +353,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc
Expand Down
6 changes: 5 additions & 1 deletion hl/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc
Expand Down
2 changes: 1 addition & 1 deletion release_docs/INSTALL_CMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ BUILD_STATIC_EXECS "Build Static Executables" OFF
BUILD_TESTING "Build HDF5 Unit Testing" ON

---------------- HDF5 Build Options ---------------------
HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON
HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF
HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON
HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
HDF5_BUILD_JAVA "Build JAVA support" OFF
Expand Down
7 changes: 7 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ New Features

Configuration:
-------------
- CMake no longer builds the C++ library by default

HDF5_BUILD_CPP_LIB now defaults to OFF, which is in line with the
Autotools build defaults.

(DER - 2021/04/20)

- Removal of pre-VS2015 work-arounds

HDF5 now requires Visual Studio 2015 or greater, so old work-around
Expand Down
Loading

0 comments on commit 2a492af

Please sign in to comment.