From f9dbdbea50d58d0f0c14fb9bbf06bc09df0169cd Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:51:07 -0500 Subject: [PATCH] Convert develop to v2.0.0 (#5006) Switches previous 1.16/17/18 values to 2.0 --- .github/workflows/main-cmake-spc.yml | 30 ++++++++++++++-------------- CMakeLists.txt | 20 ++++++------------- HDF5Examples/C/H5T/CMakeLists.txt | 12 +++-------- config/cmake/HDF5ExampleCache.cmake | 6 ++---- release_docs/INSTALL_CMake.txt | 2 +- src/H5T.c | 2 +- 6 files changed, 28 insertions(+), 44 deletions(-) diff --git a/.github/workflows/main-cmake-spc.yml b/.github/workflows/main-cmake-spc.yml index 19c52f14fc1..02ad42eeca2 100644 --- a/.github/workflows/main-cmake-spc.yml +++ b/.github/workflows/main-cmake-spc.yml @@ -300,13 +300,13 @@ jobs: # SETUP - name: Install Linux Dependencies run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV + sudo apt-get update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + echo "FC=gfortran-12" >> $GITHUB_ENV # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources @@ -333,7 +333,7 @@ jobs: -DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \ -DHDF5_ENABLE_ROS3_VFD:BOOL=ON \ -DH5_NO_DEPRECATED_SYMBOLS:BOOL=OFF \ - -DHDF5_DEFAULT_API_VERSION:STRING=v116 \ + -DHDF5_DEFAULT_API_VERSION:STRING=v200 \ $GITHUB_WORKSPACE shell: bash @@ -354,13 +354,13 @@ jobs: # SETUP - name: Install Linux Dependencies run: | - sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - echo "CC=gcc-12" >> $GITHUB_ENV - echo "CXX=g++-12" >> $GITHUB_ENV - echo "FC=gfortran-12" >> $GITHUB_ENV + sudo apt-get update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + echo "CC=gcc-12" >> $GITHUB_ENV + echo "CXX=g++-12" >> $GITHUB_ENV + echo "FC=gfortran-12" >> $GITHUB_ENV # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources diff --git a/CMakeLists.txt b/CMakeLists.txt index 668785dc777..da1c9a6510d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -859,8 +859,8 @@ if (HDF5_ENABLE_SUBFILING_VFD) endif() -set (HDF5_DEFAULT_API_VERSION "v118" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116, v118)") -set_property (CACHE HDF5_DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116 v118) +set (HDF5_DEFAULT_API_VERSION "v200" CACHE STRING "Enable v2.0 API (v16, v18, v110, v112, v114, v200)") +set_property (CACHE HDF5_DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v200) #----------------------------------------------------------------------------- # Option to use 1.6.x API #----------------------------------------------------------------------------- @@ -904,20 +904,12 @@ endif () #----------------------------------------------------------------------------- # Option to use 2.x.y API #----------------------------------------------------------------------------- -set (H5_USE_116_API_DEFAULT 0) -if (HDF5_DEFAULT_API_VERSION MATCHES "v116") - set (H5_USE_116_API_DEFAULT 1) -endif () - -#----------------------------------------------------------------------------- -# Option to use 1.18.x API -#----------------------------------------------------------------------------- +set (H5_USE_200_API_DEFAULT 0) if (NOT HDF5_DEFAULT_API_VERSION) - set (HDF5_DEFAULT_API_VERSION "v118") + set (HDF5_DEFAULT_API_VERSION "v200") endif () -set (H5_USE_118_API_DEFAULT 0) -if (HDF5_DEFAULT_API_VERSION MATCHES "v118") - set (H5_USE_118_API_DEFAULT 1) +if (DEFAULT_API_VERSION MATCHES "v200") + set (H5_USE_200_API_DEFAULT 1) endif () #----------------------------------------------------------------------------- diff --git a/HDF5Examples/C/H5T/CMakeLists.txt b/HDF5Examples/C/H5T/CMakeLists.txt index ee216190ddc..4c54be33bc9 100644 --- a/HDF5Examples/C/H5T/CMakeLists.txt +++ b/HDF5Examples/C/H5T/CMakeLists.txt @@ -97,9 +97,9 @@ endforeach () # endif () # endforeach () #endif () -if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") - foreach (example_name ${2_0_examples}) - if (H5EX_BUILD_TESTING) +#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "2.0") +# foreach (example_name ${2_0_examples}) +# if (H5EX_BUILD_TESTING) # add_custom_command ( # TARGET ${EXAMPLE_VARNAME}_${example_name} # POST_BUILD @@ -337,12 +337,6 @@ if (HDF5_BUILD_TOOLS) # foreach (example_name ${1_14_examples}) # endforeach () # foreach (example_name ${2_0_examples}) - # add_custom_command ( - # TARGET ${EXAMPLE_VARNAME}_${example_name} - # POST_BUILD - # COMMAND ${CMAKE_COMMAND} - # ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/200/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl - # ) # endforeach () endif () diff --git a/config/cmake/HDF5ExampleCache.cmake b/config/cmake/HDF5ExampleCache.cmake index 37b0a3bd8ae..1ec8d408546 100644 --- a/config/cmake/HDF5ExampleCache.cmake +++ b/config/cmake/HDF5ExampleCache.cmake @@ -36,10 +36,8 @@ elseif (HDF5_DEFAULT_API_VERSION MATCHES "v112") set (H5_USE_112_API ON) elseif (HDF5_DEFAULT_API_VERSION MATCHES "v114") set (H5_USE_114_API ON) -elseif (HDF5_DEFAULT_API_VERSION MATCHES "v116") - set (H5_USE_116_API ON) -elseif (HDF5_DEFAULT_API_VERSION MATCHES "v118") - set (H5_USE_118_API ON) +elseif (HDF5_DEFAULT_API_VERSION MATCHES "v200") + set (H5_USE_200_API ON) endif () message (STATUS "HDF5 H5_LIBVER_DIR: ${H5_LIBVER_DIR} HDF5_API_VERSION: ${HDF5_DEFAULT_API_VERSION}") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index f8ae735a4b4..220b5f9ed1e 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -887,7 +887,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" 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 -HDF5_DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v116, v118)" "v118" +HDF5_DEFAULT_API_VERSION "Enable default API (v16, v18, v110, v112, v114, v200)" "v200" HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF diff --git a/src/H5T.c b/src/H5T.c index 234e29d22c4..29f76fc772e 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -636,7 +636,7 @@ const unsigned H5O_dtype_ver_bounds[] = { H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V110 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V112 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V114 */ - H5O_DTYPE_VERSION_5, /* H5F_LIBVER_V200 */ + H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V200 */ H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ };