summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cmake/README.md.cmake.in (renamed from config/cmake/README.txt.cmake.in)2
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake116
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake6
-rw-r--r--config/cmake_ext_mod/HDFTests.c4
4 files changed, 63 insertions, 65 deletions
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.md.cmake.in
index 9289870..b60e729 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.md.cmake.in
@@ -14,7 +14,7 @@ It was built with the following options:
The contents of this directory are:
COPYING - Copyright notice
- README.txt - This file
+ README.md - This file
@HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package
This binary was built with the ZLIB and SZIP/Libaec external libraries and are
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index f022a4c..56957f9 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -253,65 +253,63 @@ set (LINUX_LFS 0)
set (HDF_EXTRA_C_FLAGS)
set (HDF_EXTRA_FLAGS)
if (MINGW OR NOT WINDOWS)
- # Might want to check explicitly for Linux and possibly Cygwin
- # instead of checking for not Solaris or Darwin.
- if (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN)
- # Linux Specific flags
- # This was originally defined as _POSIX_SOURCE which was updated to
- # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
- # functionality so clock_gettime and CLOCK_MONOTONIC are defined
- # correctly. This was later updated to 200112L so that
- # posix_memalign() is visible for the direct VFD code on Linux
- # systems.
- # POSIX feature information can be found in the gcc manual at:
- # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
-
- # Need to add this so that O_DIRECT is visible for the direct
- # VFD on Linux systems.
- set (HDF_EXTRA_C_FLAGS ${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 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}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
- )
-
- # The LARGEFILE definitions were from the transition period
- # and are probably no longer needed. The FILE_OFFSET_BITS
- # check should be generalized for all POSIX systems as it
- # is in the Autotools.
- if (TEST_LFS_WORKS_COMPILE)
- if (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
- set (LARGEFILE 1)
- set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... yes")
- endif ()
- else ()
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
- )
- endif ()
- else ()
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Compile failed\n"
- )
- endif ()
- endif ()
- set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # Linux Specific flags
+ # This was originally defined as _POSIX_SOURCE which was updated to
+ # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
+ # functionality so clock_gettime and CLOCK_MONOTONIC are defined
+ # correctly. This was later updated to 200112L so that
+ # posix_memalign() is visible for the direct VFD code on Linux
+ # systems.
+ # POSIX feature information can be found in the gcc manual at:
+ # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+ set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
+
+ # Need to add this so that O_DIRECT is visible for the direct
+ # VFD on Linux systems.
+ set (HDF_EXTRA_C_FLAGS ${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 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}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
+ COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
+ )
+
+ # The LARGEFILE definitions were from the transition period
+ # and are probably no longer needed. The FILE_OFFSET_BITS
+ # check should be generalized for all POSIX systems as it
+ # is in the Autotools.
+ if (TEST_LFS_WORKS_COMPILE)
+ if (TEST_LFS_WORKS_RUN MATCHES 0)
+ set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
+ set (LARGEFILE 1)
+ set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... yes")
+ endif ()
+ else ()
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
+ )
+ endif ()
+ else ()
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Test TEST_LFS_WORKS Compile failed\n"
+ )
+ endif ()
+ endif ()
+ set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
endif ()
endif ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 53e9f8f..0f9b367 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -223,7 +223,7 @@ macro (TARGET_C_PROPERTIES wintarget libtype)
endmacro ()
#-----------------------------------------------------------------------------
-# Configure the README.txt file for the binary package
+# Configure the README.md file for the binary package
#-----------------------------------------------------------------------------
macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
@@ -301,8 +301,8 @@ macro (HDF_README_PROPERTIES target_fortran)
endif ()
configure_file (
- ${HDF_RESOURCES_DIR}/README.txt.cmake.in
- ${CMAKE_BINARY_DIR}/README.txt @ONLY
+ ${HDF_RESOURCES_DIR}/README.md.cmake.in
+ ${CMAKE_BINARY_DIR}/README.md @ONLY
)
endmacro ()
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 2d7e1b4..133540b 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -188,8 +188,8 @@ int main(void)
for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++)
{
char formatString[64];
- sprintf(formatString, "%%%sd", *currentArg);
- sprintf(s, formatString, x);
+ snprintf(formatString, sizeof(formatString), "%%%sd", *currentArg);
+ snprintf(s, 128, formatString, x);
if (strcmp(s, "1099511627776") == 0)
{
printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg);