From d172582ca9573d685a4c3a9a6399113014da4b21 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 12 Aug 2019 12:45:29 -0500 Subject: Use a STRING option for API version --- CMakeLists.txt | 23 ++++++++--------------- config/cmake/cacheinit.cmake | 2 +- release_docs/INSTALL_CMake.txt | 17 +++++++---------- release_docs/RELEASE.txt | 8 +++++++- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 488fbab..7115ecb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -642,48 +642,41 @@ if (H5_HAVE_PARALLEL) endif () endif () -set (DEFAULT_API_VERSION "v110") +set (DEFAULT_API_VERSION "v112" CACHE STRING "Enable v1.12 API (v16, v18, v110, v112)" FORCE) +set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112) #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- -option (HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF) set (H5_USE_16_API_DEFAULT 0) -if (HDF5_USE_16_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v16") set (H5_USE_16_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v16") endif () #----------------------------------------------------------------------------- # Option to use 1.8.x API #----------------------------------------------------------------------------- -option (HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF) set (H5_USE_18_API_DEFAULT 0) -if (HDF5_USE_18_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v18") set (H5_USE_18_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v18") endif () #----------------------------------------------------------------------------- # Option to use 1.10.x API #----------------------------------------------------------------------------- -option (HDF5_USE_110_API_DEFAULT "Use the HDF5 1.10.x API by default" OFF) set (H5_USE_110_API_DEFAULT 0) -if (HDF5_USE_110_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v110") set (H5_USE_110_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v110") endif () #----------------------------------------------------------------------------- # Option to use 1.12.x API #----------------------------------------------------------------------------- -option (HDF5_USE_112_API_DEFAULT "Use the HDF5 1.12.x API by default" OFF) -if (NOT HDF5_USE_16_API_DEFAULT AND NOT HDF5_USE_18_API_DEFAULT AND NOT HDF5_USE_110_API_DEFAULT AND NOT HDF5_USE_112_API_DEFAULT) - set (HDF5_USE_112_API_DEFAULT ON) +if (NOT DEFAULT_API_VERSION) + set (DEFAULT_API_VERSION "v112") endif () set (H5_USE_112_API_DEFAULT 0) -if (HDF5_USE_112_API_DEFAULT) +if (DEFAULT_API_VERSION MATCHES "v112") set (H5_USE_112_API_DEFAULT 1) - set (DEFAULT_API_VERSION "v112") endif () #----------------------------------------------------------------------------- diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 147f2ef..01c2221 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -35,7 +35,7 @@ set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) -set (HDF5_USE_112_API_DEFAULT ON CACHE BOOL "Enable v1.12 API" FORCE) +set (DEFAULT_API_VERSION "v112" CACHE STRING "Enable v1.12 API (v16, v18, v110, v112)" FORCE) set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 4bba5e8..49fef76 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -652,10 +652,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" HDF_TEST_EXPRESS "Control testing framework (0-3)" "0" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF -HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF -HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF -HDF5_USE_110_API_DEFAULT "Use the HDF5 1.10.x API by default" OFF -HDF5_USE_112_API_DEFAULT "Use the HDF5 1.12.x API by default" ON +DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112)" "v112" HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON @@ -668,13 +665,13 @@ if (HDF5_TEST_VFD) HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON ---------------- External Library Options --------------------- -HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building" "NO" -HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF -HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF -ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0 -SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0 +HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO" +HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF +HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF +ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0 +SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0 if (HDF5_ENABLE_SZIP_SUPPORT) - HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF + HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF if (WINDOWS) H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin" else () diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b4fa11c..8fa5ed7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -492,7 +492,13 @@ Bug Fixes since HDF5-1.10.3 release Configuration ------------- - - + - Correct option for default API version + + CMake options for default API version are not mutually exclusive. + Change the multiple BOOL options to a single STRING option with the + strings; v16, v18, v110, v112. + + (ADB - 2019/08/12, HDFFV-10879) Performance ------------- -- cgit v0.12