Skip to content

Commit bc6929b

Browse files
authored
Separate CacheURLs and remove LFS try-run (#197)
1 parent 45132ed commit bc6929b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+832
-953
lines changed

BITGROOM/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ endif()
3434
if (NOT H5PL_RESOURCES_DIR)
3535
include (${H5BITGROOM_SOURCE_DIR}/config/cmake/HDFMacros.cmake)
3636
include (${H5BITGROOM_SOURCE_DIR}/config/cmake/HDFPluginMacros.cmake)
37+
include (${H5BITGROOM_SOURCE_DIR}/config/CacheURLs.cmake)
3738

3839
SET_HDF_BUILD_TYPE()
3940
endif ()

BITGROOM/config/CacheURLs.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright by The HDF Group.
3+
# All rights reserved.
4+
#
5+
# This file is part of HDF5. The full HDF5 copyright notice, including
6+
# terms governing use, modification, and redistribution, is contained in
7+
# the COPYING file, which can be found at the root of the source code
8+
# distribution tree, or in https://www.hdfgroup.org/licenses.
9+
# If you do not have access to either file, you may request a copy from
10+
11+
#
12+
# This is the CacheURLs file.
13+
14+
########################
15+
# EXTERNAL cache entries
16+
########################
17+
18+
set (BITGROOM_GIT_URL "https://no_url/bitgroom.git" CACHE STRING "Use BITGROOM from repository" FORCE)
19+
set (BITGROOM_GIT_BRANCH "master" CACHE STRING "" FORCE)
20+
21+
set (BITGROOM_TGZ_ORIGPATH "https://no_url" CACHE STRING "Use PLUGINS from original location" FORCE)
22+
set (BITGROOM_TGZ_NAME "bitgroom-1.0.tar.gz" CACHE STRING "Use BITGROOM from compressed file" FORCE)

BITGROOM/config/cmake/ConfigureChecks.cmake

Lines changed: 36 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
169169
)
170170
endif ()
171171

172-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
173-
message (TRACE "Performing ${OTHER_TEST}")
174-
endif ()
172+
message (TRACE "Performing ${OTHER_TEST}")
175173
try_compile (${OTHER_TEST}
176174
${CMAKE_BINARY_DIR}
177175
${H5BITGROOM_RESOURCES_DIR}/H5PLTests.c
@@ -194,24 +192,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
194192
endmacro ()
195193

196194
#-----------------------------------------------------------------------------
197-
# Check for these functions before the time headers are checked
198-
#-----------------------------------------------------------------------------
199-
HDF_FUNCTION_TEST (STDC_HEADERS)
200-
201-
#-----------------------------------------------------------------------------
202-
# Check for large file support
195+
# Platform-specific flags
203196
#-----------------------------------------------------------------------------
204197

205-
# The linux-lfs option is deprecated.
206-
set (LINUX_LFS 0)
207-
208198
set (HDF_EXTRA_C_FLAGS)
209-
set (HDF_EXTRA_FLAGS)
210-
if (MINGW OR NOT WINDOWS)
211-
# Might want to check explicitly for Linux and possibly Cygwin
212-
# instead of checking for not Solaris or Darwin.
213-
if (NOT HAVE_SOLARIS AND NOT HAVE_DARWIN)
214-
# Linux Specific flags
199+
200+
# Linux-specific flags
201+
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
215202
# This was originally defined as _POSIX_SOURCE which was updated to
216203
# _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
217204
# functionality so clock_gettime and CLOCK_MONOTONIC are defined
@@ -222,42 +209,36 @@ if (MINGW OR NOT WINDOWS)
222209
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
223210
set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
224211

225-
option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
226-
if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
227-
set (msg "Performing TEST_LFS_WORKS")
228-
try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
229-
${CMAKE_BINARY_DIR}
230-
${H5BITGROOM_RESOURCES_DIR}/H5PLTests.c
231-
COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
232-
)
212+
# Set up large file support. This is only necessary on 32-bit systems
213+
# but is used on all Linux systems. It has no effect on 64-bit systems
214+
# so it's not worth hacking up a 32/64-bit test to selectively include it.
215+
#
216+
# The library currently does not use any of the 64-flavored API calls
217+
# or types
218+
set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_LARGEFILE_SOURCE)
219+
set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_FILE_OFFSET_BITS=64)
233220

234-
# The LARGEFILE definitions were from the transition period
235-
# and are probably no longer needed. The FILE_OFFSET_BITS
236-
# check should be generalized for all POSIX systems as it
237-
# is in the Autotools.
238-
if (TEST_LFS_WORKS_COMPILE)
239-
if (TEST_LFS_WORKS_RUN MATCHES 0)
240-
set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
241-
set (LARGEFILE 1)
242-
set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
243-
message (VERBOSE "${msg}... yes")
244-
else ()
245-
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
246-
message (VERBOSE "${msg}... no")
247-
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
248-
"Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
249-
)
250-
endif ()
251-
else ()
252-
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
253-
message (VERBOSE "${msg}... no")
254-
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
255-
"Test TEST_LFS_WORKS Compile failed\n"
256-
)
257-
endif ()
258-
endif ()
259-
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
260-
endif ()
221+
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_C_FLAGS})
222+
endif ()
223+
224+
# As of 2024, both AIX and Solaris are uncommon, but still exist! The default
225+
# compiler options are also often set to -m32, which produces 32-bit binaries.
226+
227+
# 32-bit AIX compiles might require _LARGE_FILES, but we don't have a system on
228+
# which to test this (yet).
229+
#
230+
# https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files
231+
232+
# 32-bit Solaris probably needs _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64,
233+
# as in Linux, above.
234+
#
235+
# https://docs.oracle.com/cd/E23824_01/html/821-1474/lfcompile-5.html
236+
237+
# MinGW and Cygwin
238+
if (MINGW OR CYGWIN)
239+
set (CMAKE_REQUIRED_DEFINITIONS
240+
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
241+
)
261242
endif ()
262243

263244
#-----------------------------------------------------------------------------
@@ -266,15 +247,11 @@ endif ()
266247
macro (HDF_CHECK_TYPE_SIZE type var)
267248
set (aType ${type})
268249
set (aVar ${var})
269-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
270-
message (TRACE "Checking size of ${aType} and storing into ${aVar}")
271-
endif ()
250+
message (TRACE "Checking size of ${aType} and storing into ${aVar}")
272251
CHECK_TYPE_SIZE (${aType} ${aVar})
273252
if (NOT ${aVar})
274253
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
275-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
276-
message (TRACE "Size of ${aType} was NOT Found")
277-
endif ()
254+
message (TRACE "Size of ${aType} was NOT Found")
278255
endif ()
279256
endmacro ()
280257

BITGROOM/config/cmake/cacheinit.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ set (HDF5_PACKAGE_NAME "hdf5" CACHE STRING "Name of HDF5 package" FORCE)
2323

2424
set (HDF5_NAMESPACE "hdf5::" CACHE STRING "Name space of HDF5 library" FORCE)
2525

26-
set (BITGROOM_GIT_URL "https://no_url/bitgroom.git" CACHE STRING "Use BITGROOM from repository" FORCE)
27-
set (BITGROOM_GIT_BRANCH "master" CACHE STRING "" FORCE)
28-
29-
set (BITGROOM_TGZ_ORIGPATH "https://no_url" CACHE STRING "Use PLUGINS from original location" FORCE)
30-
set (BITGROOM_TGZ_NAME "bitgroom-1.0.tar.gz" CACHE STRING "Use BITGROOM from compressed file" FORCE)
31-
3226
set (BITGROOM_PACKAGE_NAME "bitgroom" CACHE STRING "Name of BITGROOM package" FORCE)
3327
set (H5BITGROOM_CPACK_ENABLE ON CACHE BOOL "Enable the CPACK include and components" FORCE)
3428

BITROUND/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ endif()
3434
if (NOT H5PL_RESOURCES_DIR)
3535
include (${H5BITROUND_SOURCE_DIR}/config/cmake/HDFMacros.cmake)
3636
include (${H5BITROUND_SOURCE_DIR}/config/cmake/HDFPluginMacros.cmake)
37+
include (${H5BITROUND_SOURCE_DIR}/config/CacheURLs.cmake)
3738

3839
SET_HDF_BUILD_TYPE()
3940
endif ()

BITROUND/config/CacheURLs.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright by The HDF Group.
3+
# All rights reserved.
4+
#
5+
# This file is part of HDF5. The full HDF5 copyright notice, including
6+
# terms governing use, modification, and redistribution, is contained in
7+
# the COPYING file, which can be found at the root of the source code
8+
# distribution tree, or in https://www.hdfgroup.org/licenses.
9+
# If you do not have access to either file, you may request a copy from
10+
11+
#
12+
# This is the CacheURLs file.
13+
14+
########################
15+
# EXTERNAL cache entries
16+
########################
17+
18+
set (BITROUND_GIT_URL "https://no_url/granularbr.git" CACHE STRING "Use BITROUND from repository" FORCE)
19+
set (BITROUND_GIT_BRANCH "master" CACHE STRING "" FORCE)
20+
21+
set (BITROUND_TGZ_ORIGPATH "https://no_url" CACHE STRING "Use PLUGINS from original location" FORCE)
22+
set (BITROUND_TGZ_NAME "granularbr-1.0.tar.gz" CACHE STRING "Use BITROUND from compressed file" FORCE)

BITROUND/config/cmake/ConfigureChecks.cmake

Lines changed: 36 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
169169
)
170170
endif ()
171171

172-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
173-
message (TRACE "Performing ${OTHER_TEST}")
174-
endif ()
172+
message (TRACE "Performing ${OTHER_TEST}")
175173
try_compile (${OTHER_TEST}
176174
${CMAKE_BINARY_DIR}
177175
${H5BITROUND_RESOURCES_DIR}/H5PLTests.c
@@ -194,24 +192,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
194192
endmacro ()
195193

196194
#-----------------------------------------------------------------------------
197-
# Check for these functions before the time headers are checked
198-
#-----------------------------------------------------------------------------
199-
HDF_FUNCTION_TEST (STDC_HEADERS)
200-
201-
#-----------------------------------------------------------------------------
202-
# Check for large file support
195+
# Platform-specific flags
203196
#-----------------------------------------------------------------------------
204197

205-
# The linux-lfs option is deprecated.
206-
set (LINUX_LFS 0)
207-
208198
set (HDF_EXTRA_C_FLAGS)
209-
set (HDF_EXTRA_FLAGS)
210-
if (MINGW OR NOT WINDOWS)
211-
# Might want to check explicitly for Linux and possibly Cygwin
212-
# instead of checking for not Solaris or Darwin.
213-
if (NOT HAVE_SOLARIS AND NOT HAVE_DARWIN)
214-
# Linux Specific flags
199+
200+
# Linux-specific flags
201+
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
215202
# This was originally defined as _POSIX_SOURCE which was updated to
216203
# _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
217204
# functionality so clock_gettime and CLOCK_MONOTONIC are defined
@@ -222,42 +209,36 @@ if (MINGW OR NOT WINDOWS)
222209
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
223210
set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
224211

225-
option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
226-
if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
227-
set (msg "Performing TEST_LFS_WORKS")
228-
try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
229-
${CMAKE_BINARY_DIR}
230-
${H5BITROUND_RESOURCES_DIR}/H5PLTests.c
231-
COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
232-
)
212+
# Set up large file support. This is only necessary on 32-bit systems
213+
# but is used on all Linux systems. It has no effect on 64-bit systems
214+
# so it's not worth hacking up a 32/64-bit test to selectively include it.
215+
#
216+
# The library currently does not use any of the 64-flavored API calls
217+
# or types
218+
set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_LARGEFILE_SOURCE)
219+
set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_FILE_OFFSET_BITS=64)
233220

234-
# The LARGEFILE definitions were from the transition period
235-
# and are probably no longer needed. The FILE_OFFSET_BITS
236-
# check should be generalized for all POSIX systems as it
237-
# is in the Autotools.
238-
if (TEST_LFS_WORKS_COMPILE)
239-
if (TEST_LFS_WORKS_RUN MATCHES 0)
240-
set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
241-
set (LARGEFILE 1)
242-
set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
243-
message (VERBOSE "${msg}... yes")
244-
else ()
245-
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
246-
message (VERBOSE "${msg}... no")
247-
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
248-
"Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
249-
)
250-
endif ()
251-
else ()
252-
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
253-
message (VERBOSE "${msg}... no")
254-
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
255-
"Test TEST_LFS_WORKS Compile failed\n"
256-
)
257-
endif ()
258-
endif ()
259-
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
260-
endif ()
221+
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_C_FLAGS})
222+
endif ()
223+
224+
# As of 2024, both AIX and Solaris are uncommon, but still exist! The default
225+
# compiler options are also often set to -m32, which produces 32-bit binaries.
226+
227+
# 32-bit AIX compiles might require _LARGE_FILES, but we don't have a system on
228+
# which to test this (yet).
229+
#
230+
# https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files
231+
232+
# 32-bit Solaris probably needs _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64,
233+
# as in Linux, above.
234+
#
235+
# https://docs.oracle.com/cd/E23824_01/html/821-1474/lfcompile-5.html
236+
237+
# MinGW and Cygwin
238+
if (MINGW OR CYGWIN)
239+
set (CMAKE_REQUIRED_DEFINITIONS
240+
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
241+
)
261242
endif ()
262243

263244
#-----------------------------------------------------------------------------
@@ -266,15 +247,11 @@ endif ()
266247
macro (HDF_CHECK_TYPE_SIZE type var)
267248
set (aType ${type})
268249
set (aVar ${var})
269-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
270-
message (TRACE "Checking size of ${aType} and storing into ${aVar}")
271-
endif ()
250+
message (TRACE "Checking size of ${aType} and storing into ${aVar}")
272251
CHECK_TYPE_SIZE (${aType} ${aVar})
273252
if (NOT ${aVar})
274253
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
275-
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
276-
message (TRACE "Size of ${aType} was NOT Found")
277-
endif ()
254+
message (TRACE "Size of ${aType} was NOT Found")
278255
endif ()
279256
endmacro ()
280257

BITROUND/config/cmake/cacheinit.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ set (HDF5_PACKAGE_NAME "hdf5" CACHE STRING "Name of HDF5 package" FORCE)
2323

2424
set (HDF5_NAMESPACE "hdf5::" CACHE STRING "Name space of HDF5 library" FORCE)
2525

26-
set (BITROUND_GIT_URL "https://no_url/granularbr.git" CACHE STRING "Use BITROUND from repository" FORCE)
27-
set (BITROUND_GIT_BRANCH "master" CACHE STRING "" FORCE)
28-
29-
set (BITROUND_TGZ_ORIGPATH "https://no_url" CACHE STRING "Use PLUGINS from original location" FORCE)
30-
set (BITROUND_TGZ_NAME "granularbr-1.0.tar.gz" CACHE STRING "Use BITROUND from compressed file" FORCE)
31-
3226
set (BITROUND_PACKAGE_NAME "granularbr" CACHE STRING "Name of BITROUND package" FORCE)
3327
set (H5BITROUND_CPACK_ENABLE ON CACHE BOOL "Enable the CPACK include and components" FORCE)
3428

BLOSC/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ endif()
3434
if (NOT H5PL_RESOURCES_DIR)
3535
include (${H5BLOSC_SOURCE_DIR}/config/cmake/HDFMacros.cmake)
3636
include (${H5BLOSC_SOURCE_DIR}/config/cmake/HDFPluginMacros.cmake)
37+
include (${H5BLOSC_SOURCE_DIR}/config/CacheURLs.cmake)
3738

3839
SET_HDF_BUILD_TYPE()
3940
endif ()

BLOSC/config/CacheURLs.cmake

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Copyright by The HDF Group.
3+
# All rights reserved.
4+
#
5+
# This file is part of HDF5. The full HDF5 copyright notice, including
6+
# terms governing use, modification, and redistribution, is contained in
7+
# the COPYING file, which can be found at the root of the source code
8+
# distribution tree, or in https://www.hdfgroup.org/licenses.
9+
# If you do not have access to either file, you may request a copy from
10+
11+
#
12+
# This is the CacheURLs file.
13+
14+
########################
15+
# EXTERNAL cache entries
16+
########################
17+
18+
set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github" FORCE)
19+
set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
20+
21+
set (BLOSC_TGZ_ORIGPATH "https://github.com/Blosc/c-blosc/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE)
22+
set (BLOSC_TGZ_NAME "c-blosc-1.21.6.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
23+
24+
set (BLOSC_ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE)
25+
set (BLOSC_ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)
26+
27+
set (BLOSC_ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3.1" CACHE STRING "Use PLUGINS from original location" FORCE)
28+
set (BLOSC_ZLIB_TGZ_NAME "zlib-1.3.1.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)

0 commit comments

Comments
 (0)