summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeInstallation.cmake2
-rwxr-xr-xconfig/cmake/scripts/HDF5options.cmake14
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake4
-rw-r--r--fortran/src/H5config_f.inc.cmake2
-rw-r--r--src/CMakeLists.txt61
5 files changed, 54 insertions, 29 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 2339049..464477b 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -125,7 +125,7 @@ else ()
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
- ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
+ ${HDF5_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
)
install (
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 80a28d3..440a3ae 100755
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -70,18 +70,18 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
### enable parallel builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON")
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF”)
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF”)
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF”)
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF")
#############################################################################################
### enable thread-safety builds
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=ON”)
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=ON")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF”)
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF”)
-#set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_HL_LIB:BOOL=OFF”)
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_HL_LIB:BOOL=OFF")
#############################################################################################
### disable test program builds
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 4204511..40f1440 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -273,7 +273,7 @@ if (NOT WINDOWS)
set (HDF_EXTRA_C_FLAGS -D_GNU_SOURCE)
option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- if (HDF_ENABLE_LARGE_FILE)
+ if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
set (msg "Performing TEST_LFS_WORKS")
TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
${CMAKE_BINARY_DIR}
@@ -563,7 +563,7 @@ endif ()
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
message (STATUS "Checking for InitOnceExecuteOnce:")
- if (NOT DEFINED ${${HDF_PREFIX}_HAVE_IOEO})
+ if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO)
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake
index aa3d135..3dd3c8c 100644
--- a/fortran/src/H5config_f.inc.cmake
+++ b/fortran/src/H5config_f.inc.cmake
@@ -12,7 +12,7 @@
! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure
! Define if we have parallel support
-#cmakedefine01 H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@
+#cmakedefine01 H5_HAVE_PARALLEL
#if H5_HAVE_PARALLEL == 0
#undef H5_HAVE_PARALLEL
#endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7045012..610111b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -895,31 +895,54 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
TARGET_C_PROPERTIES (H5detect STATIC)
target_link_libraries (H5detect
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- INTERFACE $<$<PLATFORM_ID:Emscripten>:"-O0">
+ PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
- add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
- ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
- DEPENDS H5detect
- WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
- )
- if (BUILD_SHARED_LIBS)
- if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c)
+ if (HDF5_BATCH_H5DETECT)
+ configure_file (
+ ${HDF5_SOURCE_DIR}/bin/batch/${HDF5_DETECT_BATCH_SCRIPT}.in
+ ${HDF5_BINARY_DIR}/${HDF5_DETECT_BATCH_SCRIPT} ESCAPE_QUOTES @ONLY
+ )
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ COMMAND ${HDF5_BATCH_CMD}
+ ARGS ${HDF5_BATCH_H5DETECT_SCRIPT}
+ DEPENDS H5detect
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
+ if (BUILD_SHARED_LIBS)
add_custom_command (
- OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
- ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
- DEPENDS H5detect
- WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}/shared
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
)
- else ()
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
+ else ()
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
+ ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ DEPENDS H5detect
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
+ if (BUILD_SHARED_LIBS)
+ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
+ ARGS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ DEPENDS H5detect
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}/shared
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
+ endif ()
endif ()
else ()
- set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
@@ -937,7 +960,7 @@ target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_
TARGET_C_PROPERTIES (H5make_libsettings STATIC)
target_link_libraries (H5make_libsettings
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- INTERFACE $<$<PLATFORM_ID:Emscripten>:"-O0">
+ PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
add_custom_command (
@@ -947,6 +970,7 @@ add_custom_command (
DEPENDS H5make_libsettings
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
@@ -955,6 +979,7 @@ if (BUILD_SHARED_LIBS)
DEPENDS H5make_libsettings
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
+ set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
endif ()
## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"