Create a file containing the major CMake options (#5666)

This commit is contained in:
Allen Byrne
2025-07-18 14:47:02 -05:00
committed by GitHub
parent ad76f8274b
commit ed5c07223a
22 changed files with 223 additions and 169 deletions
+86
View File
@@ -0,0 +1,86 @@
# Put all top-level options build options into one place
# This file will be included at the beginning of the root CMakeLists.txt
option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
mark_as_advanced (HDF5_USE_FOLDERS)
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
option (HDF5_ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
mark_as_advanced (HDF5_ALLOW_UNSUPPORTED)
option (HDF5_ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
mark_as_advanced (HDF5_ONLY_SHARED_LIBS)
option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
option (HDF5_BUILD_STATIC_TOOLS "Build Static Tools NOT Shared Tools" OFF)
mark_as_advanced (HDF5_BUILD_STATIC_TOOLS)
option (BUILD_STATIC_EXECS "Build Static Executables" OFF)
mark_as_advanced (BUILD_STATIC_EXECS)
option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF)
mark_as_advanced (HDF5_ENABLE_SANITIZERS)
option (HDF5_ENABLE_FORMATTERS "format source files" OFF)
mark_as_advanced (HDF5_ENABLE_FORMATTERS)
option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
mark_as_advanced (HDF5_ENABLE_COVERAGE)
option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
mark_as_advanced (HDF5_ENABLE_USING_MEMCHECKER)
option (HDF5_ENABLE_PREADWRITE "Use pread/pwrite in sec2/log/core VFDs in place of read/write (when available)" ON)
mark_as_advanced (HDF5_ENABLE_PREADWRITE)
option (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
mark_as_advanced (HDF5_MINGW_STATIC_GCC_LIBS)
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
mark_as_advanced (HDF5_ENABLE_TRACE)
option (HDF5_ENABLE_EMBEDDED_LIBINFO "Embed library info into executables" ON)
mark_as_advanced (HDF5_ENABLE_EMBEDDED_LIBINFO)
option (HDF5_ENABLE_HDFS "Enable HDFS" OFF)
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF)
option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
mark_as_advanced (HDF5_PACKAGE_EXTLIBS)
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
option (HDF5_ENABLE_CONCURRENCY "Enable multi-threaded concurrency" OFF)
option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
mark_as_advanced (HDF5_ENABLE_MAP_API)
option (HDF5_BUILD_DOC "Build documentation" OFF)
option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF)
mark_as_advanced (HDF5_BUILD_PARALLEL_TOOLS)
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON)
option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON)
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF)
option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
+26 -26
View File
@@ -9,12 +9,12 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_dependent_option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF HDF5_ENABLE_ZLIB_SUPPORT OFF)
option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF)
cmake_dependent_option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF HDF5_ENABLE_ZLIB_SUPPORT OFF)
cmake_dependent_option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF HDF5_ENABLE_SZIP_SUPPORT OFF)
cmake_dependent_option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF HDF5_ENABLE_ZLIB_SUPPORT OFF)
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
mark_as_advanced (ZLIB_USE_EXTERNAL)
cmake_dependent_option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF HDF5_ENABLE_SZIP_SUPPORT OFF)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)
mark_as_advanced (SZIP_USE_EXTERNAL)
cmake_dependent_option (ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" OFF HDF5_ENABLE_ZLIB_SUPPORT OFF)
mark_as_advanced (ZLIB_USE_LOCALCONTENT)
@@ -85,17 +85,17 @@ endif ()
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
set(H5_ZLIB_FOUND FALSE)
if(NOT DEFINED ZLIB_PACKAGE_NAME)
set(ZLIB_PACKAGE_NAME "zlib")
set (H5_ZLIB_FOUND FALSE)
if (NOT DEFINED ZLIB_PACKAGE_NAME)
set (ZLIB_PACKAGE_NAME "zlib")
endif ()
if(NOT DEFINED ZLIBNG_PACKAGE_NAME)
set(ZLIBNG_PACKAGE_NAME "zlib-ng")
if (NOT DEFINED ZLIBNG_PACKAGE_NAME)
set (ZLIBNG_PACKAGE_NAME "zlib-ng")
endif ()
if (HDF5_ENABLE_ZLIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
cmake_dependent_option (HDF5_MODULE_MODE_ZLIB "Prefer module mode to find ZLIB" ON "NOT ZLIB_USE_EXTERNAL" OFF)
option (HDF5_MODULE_MODE_ZLIB "Prefer module mode to find ZLIB" ON)
mark_as_advanced (HDF5_MODULE_MODE_ZLIB)
if (HDF5_USE_ZLIB_NG)
set (HDF5_MODULE_MODE_ZLIB OFF CACHE BOOL "" FORCE)
@@ -103,7 +103,7 @@ if (HDF5_ENABLE_ZLIB_SUPPORT)
else ()
set (Z_PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
endif ()
set(ZLIB_FOUND FALSE)
set (ZLIB_FOUND FALSE)
message (VERBOSE "Filter HDF5_ZLIB package name:${Z_PACKAGE_NAME}")
if (HDF5_MODULE_MODE_ZLIB)
# Expect that the default shared library is expected with FindZLIB.cmake
@@ -111,16 +111,16 @@ if (HDF5_ENABLE_ZLIB_SUPPORT)
else ()
# Expect that a correctly built library with CMake config files is available
if (HDF5_USE_ZLIB_STATIC)
set(ZLIB_SEARCH_TYPE "static")
set (ZLIB_SEARCH_TYPE "static")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
endif()
set (ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
endif ()
else ()
set(ZLIB_SEARCH_TYPE "shared")
set (ZLIB_SEARCH_TYPE "shared")
endif ()
find_package (ZLIB NAMES ${Z_PACKAGE_NAME} CONFIG OPTIONAL_COMPONENTS ${ZLIB_SEARCH_TYPE})
endif ()
set(H5_ZLIB_FOUND ${ZLIB_FOUND})
set (H5_ZLIB_FOUND ${ZLIB_FOUND})
if (H5_ZLIB_FOUND)
if (HDF5_USE_ZLIB_NG)
set (H5_ZLIB_HEADER "zlib-ng.h")
@@ -147,7 +147,7 @@ if (HDF5_ENABLE_ZLIB_SUPPORT)
endif ()
else ()
# This project is being called from within another and ZLib is already configured
set(H5_ZLIB_FOUND TRUE)
set (H5_ZLIB_FOUND TRUE)
endif ()
if (H5_ZLIB_FOUND)
set (H5_HAVE_FILTER_DEFLATE 1)
@@ -171,27 +171,27 @@ endif ()
#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
set(H5_SZIP_FOUND FALSE)
if(NOT DEFINED LIBAEC_PACKAGE_NAME)
set(LIBAEC_PACKAGE_NAME "libaec")
set (H5_SZIP_FOUND FALSE)
if (NOT DEFINED LIBAEC_PACKAGE_NAME)
set (LIBAEC_PACKAGE_NAME "libaec")
endif ()
if (HDF5_ENABLE_SZIP_SUPPORT)
cmake_dependent_option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON HDF5_ENABLE_SZIP_SUPPORT OFF)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
if (HDF5_USE_LIBAEC_STATIC)
set(LIBAEC_SEARCH_TYPE "static")
set (LIBAEC_SEARCH_TYPE "static")
else ()
set(LIBAEC_SEARCH_TYPE "shared")
set (LIBAEC_SEARCH_TYPE "shared")
endif ()
set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
set(SZIP_FOUND FALSE)
set (libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
set (SZIP_FOUND FALSE)
# Search pure Config mode, there is not a FindSZIP module available
find_package (${LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE})
set(H5_SZIP_FOUND ${${LIBAEC_PACKAGE_NAME}_FOUND})
set (H5_SZIP_FOUND ${${LIBAEC_PACKAGE_NAME}_FOUND})
if (H5_SZIP_FOUND)
set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
if(LIBAEC_PACKAGE_NAME STREQUAL "libaec")
if (LIBAEC_PACKAGE_NAME STREQUAL "libaec")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} libaec::sz libaec::aec)
else ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
+22 -61
View File
@@ -17,6 +17,12 @@ if (POLICY CMP0083)
cmake_policy (SET CMP0083 NEW)
endif ()
if (POLICY CMP0127)
# to evaluate each condition as if(<condition>), where <condition> is re-parsed
# as if literally written in a call to if().
cmake_policy (SET CMP0127 NEW)
endif ()
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
@@ -83,6 +89,10 @@ include (CMakeDependentOption)
# dependencies of the HDF5 libs may be 'incomplete', add additional
# dependencies to this variable so that external projects pick them up
#
# Put all global top-level build options into one place at the beginning
#-----------------------------------------------------------------------------
include (CMakeBuildOptions.cmake)
#option (HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." "")
set (HDF5_EXTERNAL_LIB_PREFIX "" CACHE STRING "Use prefix for custom library naming.")
mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
@@ -150,15 +160,9 @@ string (TIMESTAMP CONFIG_DATE "%Y-%m-%d")
# organization feature. Default to ON for non-Express users. Express users must
# explicitly turn off this option to build HDF5 in the Express IDE...
#
option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
mark_as_advanced (HDF5_USE_FOLDERS)
if (HDF5_USE_FOLDERS)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
endif ()
option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
option (HDF5_ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
mark_as_advanced (HDF5_ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries CORENAME is the base library name
@@ -530,11 +534,7 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
option (HDF5_ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
mark_as_advanced (HDF5_ONLY_SHARED_LIBS)
option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
# only shared libraries/tools is true if user forces static OFF
@@ -542,8 +542,6 @@ if (NOT BUILD_STATIC_LIBS)
set (HDF5_ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE)
endif ()
cmake_dependent_option (HDF5_BUILD_STATIC_TOOLS "Build Static Tools NOT Shared Tools" OFF BUILD_STATIC_LIBS OFF)
# only shared libraries is set ON by user then force settings
if (HDF5_ONLY_SHARED_LIBS)
set (H5_ENABLE_STATIC_LIB NO)
@@ -580,8 +578,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
option (BUILD_STATIC_EXECS "Build Static Executables" OFF)
mark_as_advanced (BUILD_STATIC_EXECS)
if (BUILD_STATIC_EXECS)
if (NOT WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
@@ -589,18 +585,15 @@ if (BUILD_STATIC_EXECS)
endif ()
endif ()
option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
#-----------------------------------------------------------------------------
# Options to analyze the code with various tools
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_ANALYZER_TOOLS)
include (${HDF_CONFIG_DIR}/sanitizer/tools.cmake)
endif ()
option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF)
mark_as_advanced (HDF5_ENABLE_SANITIZERS)
if (HDF5_ENABLE_SANITIZERS)
include (${HDF_CONFIG_DIR}/sanitizer/sanitizers.cmake)
endif ()
option (HDF5_ENABLE_FORMATTERS "format source files" OFF)
mark_as_advanced (HDF5_ENABLE_FORMATTERS)
if (HDF5_ENABLE_FORMATTERS)
include (${HDF_CONFIG_DIR}/sanitizer/formatting.cmake)
endif ()
@@ -608,15 +601,13 @@ endif ()
#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
mark_as_advanced (HDF5_ENABLE_COVERAGE)
if (HDF5_ENABLE_COVERAGE)
include (${HDF_CONFIG_DIR}/sanitizer/code-coverage.cmake)
if(CODE_COVERAGE AND CODE_COVERAGE_ADDED)
message(VERBOSE "Add instrumentation to all targets")
if (CODE_COVERAGE AND CODE_COVERAGE_ADDED)
message (VERBOSE "Add instrumentation to all targets")
add_code_coverage () # Adds instrumentation to all targets
else ()
message(VERBOSE "Use --coverage option")
message (VERBOSE "Use --coverage option")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage -fprofile-arcs -ftest-coverage")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage -O0 -fprofile-arcs -ftest-coverage")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
@@ -631,8 +622,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to indicate using a memory checker
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
mark_as_advanced (HDF5_ENABLE_USING_MEMCHECKER)
if (HDF5_ENABLE_USING_MEMCHECKER)
set (H5_USING_MEMCHECKER 1)
endif ()
@@ -640,8 +629,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to enable/disable using pread/pwrite for VFDs
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_PREADWRITE "Use pread/pwrite in sec2/log/core VFDs in place of read/write (when available)" ON)
mark_as_advanced (HDF5_ENABLE_PREADWRITE)
if (HDF5_ENABLE_PREADWRITE AND H5_HAVE_PREAD AND H5_HAVE_PWRITE)
set (H5_HAVE_PREADWRITE 1)
endif ()
@@ -649,7 +636,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to use deprecated public API symbols
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
set (H5_NO_DEPRECATED_SYMBOLS 0)
else ()
@@ -669,9 +655,6 @@ if (WIN32)
endif ()
endif ()
option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
mark_as_advanced(HDF5_MINGW_STATIC_GCC_LIBS)
if (MSVC)
set (CMAKE_MFC_FLAG 0)
set (WIN_COMPILE_FLAGS "")
@@ -681,8 +664,6 @@ endif ()
#-----------------------------------------------------------------------------
# Add some definitions for Debug Builds
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
mark_as_advanced (HDF5_ENABLE_TRACE)
if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
# Enable instrumenting of the library's internal operations
cmake_dependent_option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF HDF5_ENABLE_TRACE OFF)
@@ -695,7 +676,6 @@ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
if (HDF5_ENABLE_INSTRUMENT)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
endif ()
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
endif ()
#-----------------------------------------------------------------------------
@@ -711,7 +691,6 @@ endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set (H5_HAVE_EMBEDDED_LIBINFO 0)
else ()
option (HDF5_ENABLE_EMBEDDED_LIBINFO "Embed library info into executables" ON)
if (HDF5_ENABLE_EMBEDDED_LIBINFO)
set (H5_HAVE_EMBEDDED_LIBINFO 1)
endif ()
@@ -723,13 +702,12 @@ set (CMAKE_MODULE_PATH ${HDF_CONFIG_DIR} ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PAT
#-----------------------------------------------------------------------------
# Option to Enable HDFS
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_HDFS "Enable HDFS" OFF)
if (HDF5_ENABLE_HDFS)
find_package(JNI REQUIRED)
find_package (JNI REQUIRED)
if (JNI_FOUND)
set (H5_HAVE_LIBJVM 1)
endif ()
find_package(HDFS REQUIRED)
find_package (HDFS REQUIRED)
if (HDFS_FOUND)
set (H5_HAVE_LIBHDFS 1)
set (H5_HAVE_HDFS_H 1)
@@ -745,9 +723,8 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
find_package(MPI REQUIRED)
find_package (MPI REQUIRED)
if (MPI_C_FOUND)
set (H5_HAVE_PARALLEL 1)
@@ -926,8 +903,6 @@ include (UserMacros.cmake)
#-----------------------------------------------------------------------------
# Include filter (zlib, szip, etc.) macros
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
option (HDF5_ENABLE_ZLIB_SUPPORT "Enable Zlib Filters" OFF)
if (HDF5_ENABLE_ZLIB_SUPPORT OR HDF5_ENABLE_SZIP_SUPPORT)
include (CMakeFilters.cmake)
endif ()
@@ -940,7 +915,6 @@ include (CMakeVOL.cmake)
#-----------------------------------------------------------------------------
# Option for external libraries on windows
#-----------------------------------------------------------------------------
option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_PACKAGE_EXTLIBS)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
@@ -950,7 +924,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to use threadsafe
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
if (WIN32)
@@ -998,7 +971,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to use multi-threaded concurrency
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_CONCURRENCY "Enable multi-threaded concurrency" OFF)
if (HDF5_ENABLE_CONCURRENCY)
# check for unsupported options
if (WIN32)
@@ -1051,7 +1023,6 @@ endif ()
#-----------------------------------------------------------------------------
# Option to build the map API
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
if (HDF5_ENABLE_MAP_API)
set (H5_HAVE_MAP_API 1)
else ()
@@ -1087,10 +1058,9 @@ endif ()
#-----------------------------------------------------------------------------
# Option to build documentation
#-----------------------------------------------------------------------------
option (HDF5_BUILD_DOC "Build documentation" OFF)
if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}")
# check if Doxygen is installed
find_package(Doxygen)
find_package (Doxygen)
if (DOXYGEN_FOUND)
option (HDF5_ENABLE_DOXY_WARNINGS "Enable fail if doxygen parsing has warnings." OFF)
mark_as_advanced (HDF5_ENABLE_DOXY_WARNINGS)
@@ -1099,17 +1069,16 @@ if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOX
else ()
set (HDF5_DOXY_WARNINGS "NO")
endif ()
message(VERBOSE "Doxygen version: ${DOXYGEN_VERSION}")
message (VERBOSE "Doxygen version: ${DOXYGEN_VERSION}")
add_subdirectory (doxygen)
else ()
message(WARNING "Doxygen needs to be installed to generate the doxygen documentation")
message (WARNING "Doxygen needs to be installed to generate the doxygen documentation")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
#-----------------------------------------------------------------------------
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
if (BUILD_TESTING)
include (CMakeTests.cmake)
endif ()
@@ -1118,7 +1087,6 @@ endif ()
# Option to build HDF5 Utilities
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils")
option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF)
if (HDF5_BUILD_PARALLEL_TOOLS AND HDF5_ENABLE_PARALLEL)
set (CMAKE_PREFIX_PATH "$HDF_RESOURCES_DIR")
find_package (MFU REQUIRED)
@@ -1150,7 +1118,6 @@ endif ()
# Option to build HDF5 Tools
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON)
if (HDF5_BUILD_TOOLS)
add_subdirectory (tools)
endif ()
@@ -1159,7 +1126,6 @@ endif ()
#-----------------------------------------------------------------------------
# Include filter plugins
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
if (HDF5_ENABLE_PLUGIN_SUPPORT)
if (${H5_LIBVER_DIR} EQUAL 16 OR HDF5_DEFAULT_API_VERSION MATCHES "v16")
set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
@@ -1177,7 +1143,6 @@ endif ()
# Option to build High Level API's
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON)
if (HDF5_BUILD_HL_LIB)
set (H5_INCLUDE_HL 1)
add_subdirectory (hl)
@@ -1193,7 +1158,6 @@ endif ()
set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _" CACHE INTERNAL "Fortran name mangling macro for C identifiers without underscores")
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _" CACHE INTERNAL "Fortran name mangling macro for C identifiers with underscores")
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
if (HDF5_BUILD_FORTRAN)
add_subdirectory (fortran)
if (HDF5_BUILD_HL_LIB)
@@ -1209,7 +1173,6 @@ 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" OFF)
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
@@ -1236,7 +1199,6 @@ endif ()
# Option to build HDF5 Java Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java")
option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF)
if (HDF5_BUILD_JAVA)
if (NOT BUILD_SHARED_LIBS)
message (FATAL_ERROR "\nJava requires shared libraries!\n")
@@ -1255,7 +1217,6 @@ configure_file (${HDF_CONFIG_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubcon
# Option to build examples
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/HDF5Examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/HDF5Examples")
option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
if (HDF5_BUILD_EXAMPLES AND NOT HDF5_USE_SANITIZER)
include (${HDF_RESOURCES_DIR}/HDF5ExampleCache.cmake)
set (HDF5_VERSION ${HDF5_PACKAGE_VERSION})
+29 -34
View File
@@ -23,7 +23,7 @@
math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
cmake_dependent_option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "" BUILD_TESTING "")
option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "")
mark_as_advanced (HDF5_DISABLE_TESTS_REGEX)
if (HDF5_ENABLE_ROS3_VFD)
@@ -33,41 +33,37 @@
endif ()
endif ()
cmake_dependent_option (HDF5_TEST_API "Execute HDF5 API tests" ON BUILD_TESTING OFF)
option (HDF5_TEST_API "Execute HDF5 API tests" ON)
mark_as_advanced (HDF5_TEST_API)
if (HDF5_TEST_API)
cmake_dependent_option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_INSTALL)
cmake_dependent_option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_INSTALL)
# Enable HDF5 Async API tests
cmake_dependent_option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC)
# Enable HDF5 Async API tests
cmake_dependent_option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC)
# Build and use HDF5 test driver program for API tests
cmake_dependent_option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER)
if (HDF5_TEST_API_ENABLE_DRIVER)
set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests")
mark_as_advanced (HDF5_TEST_API_SERVER)
endif ()
# Build and use HDF5 test driver program for API tests
cmake_dependent_option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF HDF5_TEST_API OFF)
mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER)
if (HDF5_TEST_API_ENABLE_DRIVER)
set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests")
mark_as_advanced (HDF5_TEST_API_SERVER)
endif ()
cmake_dependent_option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF BUILD_TESTING OFF)
option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
mark_as_advanced (HDF5_TEST_VFD)
cmake_dependent_option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON HDF5_TEST_VFD OFF)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
if (HDF5_TEST_VFD)
cmake_dependent_option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON HDF5_TEST_VFD OFF)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
# Initialize the list of VFDs to be used for testing and create a test folder for each VFD
H5_SET_VFD_LIST()
H5_SET_VFD_LIST ()
endif ()
cmake_dependent_option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF BUILD_TESTING OFF)
option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL)
if (HDF5_TEST_PASSTHROUGH_VOL)
cmake_dependent_option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON HDF5_TEST_PASSTHROUGH_VOL OFF)
mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
endif ()
cmake_dependent_option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON HDF5_TEST_PASSTHROUGH_VOL OFF)
mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
set (H5_TEST_EXPRESS_LEVEL_DEFAULT "3")
set (HDF_TEST_EXPRESS "${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
@@ -83,28 +79,27 @@
include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
configure_file (${HDF_CONFIG_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
cmake_dependent_option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON BUILD_TESTING OFF)
option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
mark_as_advanced (HDF5_TEST_SERIAL)
cmake_dependent_option (HDF5_TEST_TOOLS "Execute tools tests" ON "BUILD_TESTING;HDF5_BUILD_TOOLS" OFF)
mark_as_advanced (HDF5_TEST_TOOLS)
cmake_dependent_option (HDF5_TEST_TOOLS "Execute tools tests" ON "HDF5_BUILD_TOOLS" OFF)
cmake_dependent_option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON "BUILD_TESTING;HDF5_BUILD_EXAMPLES" OFF)
cmake_dependent_option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON "HDF5_BUILD_EXAMPLES" OFF)
mark_as_advanced (HDF5_TEST_EXAMPLES)
cmake_dependent_option (HDF5_TEST_SWMR "Execute SWMR tests" ON BUILD_TESTING OFF)
option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
mark_as_advanced (HDF5_TEST_SWMR)
cmake_dependent_option (HDF5_TEST_PARALLEL "Execute parallel tests" ON "BUILD_TESTING;HDF5_ENABLE_PARALLEL" OFF)
cmake_dependent_option (HDF5_TEST_PARALLEL "Execute parallel tests" ON "HDF5_ENABLE_PARALLEL" OFF)
mark_as_advanced (HDF5_TEST_PARALLEL)
cmake_dependent_option (HDF5_TEST_FORTRAN "Execute fortran tests" ON "BUILD_TESTING;HDF5_BUILD_FORTRAN" OFF)
cmake_dependent_option (HDF5_TEST_FORTRAN "Execute fortran tests" ON "HDF5_BUILD_FORTRAN" OFF)
mark_as_advanced (HDF5_TEST_FORTRAN)
cmake_dependent_option (HDF5_TEST_CPP "Execute cpp tests" ON "BUILD_TESTING;HDF5_BUILD_CPP_LIB" OFF)
cmake_dependent_option (HDF5_TEST_CPP "Execute cpp tests" ON "HDF5_BUILD_CPP_LIB" OFF)
mark_as_advanced (HDF5_TEST_CPP)
cmake_dependent_option (HDF5_TEST_JAVA "Execute java tests" ON "BUILD_TESTING;HDF5_BUILD_JAVA" OFF)
cmake_dependent_option (HDF5_TEST_JAVA "Execute java tests" ON "HDF5_BUILD_JAVA" OFF)
mark_as_advanced (HDF5_TEST_JAVA)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
+29 -29
View File
@@ -19,7 +19,7 @@ function (get_generated_cmake_targets out_var dir)
get_directory_property (dir_subdirs DIRECTORY "${dir}" SUBDIRECTORIES)
foreach (subdir ${dir_subdirs})
get_generated_cmake_targets(subdir_targets "${subdir}")
get_generated_cmake_targets (subdir_targets "${subdir}")
list (APPEND dir_targets "${subdir_targets}")
endforeach()
@@ -184,15 +184,15 @@ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LO
GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}"
"${OVERRIDE_FIND_PACKAGE_OPT}"
)
elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
FetchContent_Declare (${hdf5_vol_depname}
SOURCE_DIR "${HDF5_VOL_SOURCE}"
SOURCE_DIR "${HDF5_VOL_SOURCE}"
)
endif()
endif ()
FetchContent_GetProperties(${hdf5_vol_depname})
FetchContent_GetProperties (${hdf5_vol_depname})
if (NOT ${hdf5_vol_depname}_POPULATED)
FetchContent_Populate(${hdf5_vol_depname})
FetchContent_Populate (${hdf5_vol_depname})
# Now that content has been populated, set other internal
# convenience variables for FetchContent dependency
@@ -203,8 +203,8 @@ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LO
if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
message (SEND_ERROR "The git repository branch '${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
message(SEND_ERROR "The local directory '${HDF5_VOL_SOURCE}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
endif()
message (SEND_ERROR "The local directory '${HDF5_VOL_SOURCE}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
endif ()
endif ()
# If there are any calls to find_package(HDF5) in the connector's
@@ -236,48 +236,48 @@ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LO
# Define and set a custom property on the VOL connector target to
# capture all of the connector's generated targets
define_property (
TARGET
PROPERTY HDF5_VOL_TARGETS
BRIEF_DOCS "Generated targets of this connector"
FULL_DOCS "Generated targets of this connector"
TARGET
PROPERTY HDF5_VOL_TARGETS
BRIEF_DOCS "Generated targets of this connector"
FULL_DOCS "Generated targets of this connector"
)
set_target_properties (
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_TARGETS "${connector_targets}"
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_TARGETS "${connector_targets}"
)
# Define and set a custom property on the VOL connector target to
# capture the connector's name to set for the HDF5_VOL_CONNECTOR
# environment variable for testing
define_property (
TARGET
PROPERTY HDF5_VOL_NAME
BRIEF_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
FULL_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
TARGET
PROPERTY HDF5_VOL_NAME
BRIEF_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
FULL_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
)
set_target_properties (
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_NAME "${HDF5_VOL_${hdf5_vol_name_upper}_NAME}"
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_NAME "${HDF5_VOL_${hdf5_vol_name_upper}_NAME}"
)
# Define and set a custom property on the VOL connector target to
# capture whether the connector should be tested with the parallel
# API tests
define_property (
TARGET
PROPERTY HDF5_VOL_TEST_PARALLEL
BRIEF_DOCS "Whether the VOL connector should be tested with the parallel API tests"
FULL_DOCS "Whether the VOL connector should be tested with the parallel API tests"
TARGET
PROPERTY HDF5_VOL_TEST_PARALLEL
BRIEF_DOCS "Whether the VOL connector should be tested with the parallel API tests"
FULL_DOCS "Whether the VOL connector should be tested with the parallel API tests"
)
set_target_properties (
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_TEST_PARALLEL ${HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL}
"HDF5_VOL_${hdf5_vol_name_lower}"
PROPERTIES
HDF5_VOL_TEST_PARALLEL ${HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL}
)
# Add this VOL connector's target to the list of external connector targets
+1 -1
View File
@@ -144,7 +144,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -151,7 +151,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
fprintf(stdout, "/nFAILED to close library/n");
fprintf(stdout, "\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -139,7 +139,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+1 -1
View File
@@ -146,7 +146,7 @@ main(void)
file_id = -1;
status = H5close();
if (status < 0) {
printf("/nFAILED to close library/n");
printf("\nFAILED to close library\n");
goto done;
}
+5 -2
View File
@@ -616,7 +616,7 @@ if (HDF5_ENABLE_ROS3_VFD)
set (${HDF_PREFIX}_HAVE_ROS3_VFD 1)
cmake_dependent_option (HDF5_ENABLE_ROS3_VFD_DOCKER_PROXY "Use docker for ROS3 VFD S3proxy testing" OFF HDF5_ENABLE_ROS3_VFD OFF)
option (HDF5_ENABLE_ROS3_VFD_DOCKER_PROXY "Use docker for ROS3 VFD S3proxy testing" OFF)
if (HDF5_ENABLE_ROS3_VFD_DOCKER_PROXY)
# check if docker is available
find_program (DOCKER_EXECUTABLE docker)
@@ -981,7 +981,10 @@ H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV FALSE "Checking IF th
# be enabled or disabled with their respective options below
option (HDF5_ENABLE_NONSTANDARD_FEATURES "Enable support for non-standard programming language features" ON)
# Options for enabling or disabling individual features
cmake_dependent_option (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 "Enable support for _Float16 C datatype" ON HDF5_ENABLE_NONSTANDARD_FEATURES OFF)
option (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 "Enable support for _Float16 C datatype" ON)
if (NOT HDF5_ENABLE_NONSTANDARD_FEATURES)
set (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 OFF CACHE BOOL "Enable support for _Float16 C datatype" FORCE)
endif ()
#-----------------------------------------------------------------------------
# Check if _Float16 type is available
+3 -3
View File
@@ -29,7 +29,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION})
endif ()
if (CMAKE_C_OSX_CURRENT_VERSION_FLAG)
set_property(TARGET ${libtarget} APPEND PROPERTY
set_property (TARGET ${libtarget} APPEND PROPERTY
LINK_FLAGS "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${PACKAGE_CURRENT} ${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${PACKAGE_COMPATIBILITY}"
)
endif ()
@@ -39,7 +39,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
#-- Apple Specific install_name for libraries
if (APPLE)
cmake_dependent_option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF APPLE OFF)
mark_as_advanced(HDF5_BUILD_WITH_INSTALL_NAME)
mark_as_advanced (HDF5_BUILD_WITH_INSTALL_NAME)
if (HDF5_BUILD_WITH_INSTALL_NAME)
set_target_properties (${libtarget} PROPERTIES
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
@@ -49,7 +49,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
if (HDF5_BUILD_FRAMEWORKS)
if (${libtype} MATCHES "SHARED")
# adapt target to build frameworks instead of dylibs
set_target_properties(${libtarget} PROPERTIES
set_target_properties (${libtarget} PROPERTIES
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
FRAMEWORK TRUE
FRAMEWORK_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}
+1 -1
View File
@@ -28,7 +28,7 @@ macro (SET_HDF_OUTPUT_DIRS package_prefix)
${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules."
)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
if (_isMultiConfig)
set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME})
set (CMAKE_PDB_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
+1 -1
View File
@@ -4,7 +4,7 @@ project (HDF5_HL C)
#-----------------------------------------------------------------------------
# Option to use new-style references with dimension scale APIs
#-----------------------------------------------------------------------------
cmake_dependent_option (HDF5_DIMENSION_SCALES_NEW_REF "Use new-style references with dimension scale APIs" OFF HDF5_BUILD_HL_LIB OFF)
option (HDF5_DIMENSION_SCALES_NEW_REF "Use new-style references with dimension scale APIs" OFF)
if (HDF5_DIMENSION_SCALES_NEW_REF)
set (H5_DIMENSION_SCALES_WITH_NEW_REF 1)
endif ()
+1 -1
View File
@@ -61,7 +61,7 @@ install (
#-----------------------------------------------------------------------------
# Option to include jre
#-----------------------------------------------------------------------------
cmake_dependent_option (HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF HDF5_BUILD_JAVA OFF)
option (HDF5_JAVA_PACK_JRE "Package a JRE installer directory" OFF)
if (HDF5_JAVA_PACK_JRE)
install (
DIRECTORY ${HDF_JRE_DIRECTORY}
+9
View File
@@ -800,6 +800,15 @@ Bug Fixes since HDF5-2.0.0 release
Configuration
-------------
- Reorganized CMake HDF5 configuration options
The CMake configuration options have been reorganized to identify the
primary options that are relevant to the build. These options are now
in a separate file, CMakeBuildOptions.cmake, which is included by the
root CMakeLists.txt file. In addition some options have been converted
to cmake_dependent_option() calls, which allows the options to be hidden
from the CMake GUI when they are not relevant to the build.
- Remove default setting of CMAKE_DEBUG_POSTFIX
Move the default setting of CMAKE_DEBUG_POSTFIX to the cacheinit.cmake file