From e783b100d473f0e4f77147f3b89b0a73cb09126a Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri, 23 Dec 2022 21:24:45 -0800 Subject: Brings HL GIF tools configure changes from develop (#2361) --- config/cmake/libhdf5.settings.cmake.in | 2 +- configure.ac | 53 ++++++++++++++-------------------- hl/CMakeLists.txt | 10 +------ hl/Makefile.am | 4 --- hl/tools/CMakeLists.txt | 16 +++++----- hl/tools/Makefile.am | 2 +- src/libhdf5.settings.in | 1 + 7 files changed, 32 insertions(+), 56 deletions(-) diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 625b0c0..f2cf6c0 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -72,7 +72,7 @@ Features: Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@ Build HDF5 Tests: @BUILD_TESTING@ Build HDF5 Tools: @HDF5_BUILD_TOOLS@ - Build High-level HDF5 Tools: @HDF5_BUILD_HL_TOOLS@ + Build GIF Tools: @HDF5_BUILD_HL_GIF_TOOLS@ Threadsafety: @HDF5_ENABLE_THREADSAFE@ Default API mapping: @DEFAULT_API_VERSION@ With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@ diff --git a/configure.ac b/configure.ac index 2a377f6..d6e90e6 100644 --- a/configure.ac +++ b/configure.ac @@ -874,37 +874,6 @@ else AC_MSG_RESULT([no]) fi -AC_MSG_CHECKING([if the high-level tools are enabled]) -AC_ARG_ENABLE([hltools], - [AS_HELP_STRING([--enable-hltools], - [Enable the high-level tools. - [default=yes] - ])], - [HDF5_HL_TOOLS=$enableval]) - -if test "X${HDF5_HL}" = "Xyes" -a "X-$HDF5_HL_TOOLS" = "X-yes"; then - AC_MSG_RESULT([yes]) - HL_TOOLS="tools" -else - AC_MSG_RESULT([no]) -fi - -AC_MSG_CHECKING([if the high-level GIF tools are enabled]) -AC_ARG_ENABLE([hltools], - [AS_HELP_STRING([--enable-hlgiftools], - [Enable the high-level GIF tools. - [default=no] - ])], - [HDF5_HL_GIF_TOOLS=$enableval]) - -if test "X${HDF5_GIF_HL}" = "Xyes" -a "X-$HDF5_HL_TOOLS" = "X-yes" -a "X-$HDF5_HL_GIF_TOOLS" = "X-yes"; then - AC_MSG_RESULT([yes]) - HL_GIF_TOOLS="tools" -else - AC_MSG_RESULT([no]) -fi - - ## ---------------------------------------------------------------------- ## Enable new references for dimension scales ## @@ -1196,6 +1165,27 @@ AC_ARG_ENABLE([tools], AC_MSG_RESULT([$HDF5_TOOLS]) ## ---------------------------------------------------------------------- +## Check if they would like to disable building the high-level GIF +## tools (they have unfixed CVE issues) +## + +AC_MSG_CHECKING([if the high-level GIF tools are enabled]) +AC_ARG_ENABLE([hlgiftools], + [AS_HELP_STRING([--enable-hlgiftools], + [Enable the high-level GIF tools. NOTE: These have unfixed CVE issues! + [default=no] + ])], + [HDF5_HL_GIF_TOOLS=$enableval]) + +if test "X-$HDF5_TOOLS" = "X-yes" -a "X-$HDF5_HL" = "X-yes" -a "X-$HDF5_HL_GIF_TOOLS" = "X-yes"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + HDF5_HL_GIF_TOOLS="no" +fi + + +## ---------------------------------------------------------------------- ## Check if they would like to enable building doxygen files ## @@ -3922,7 +3912,6 @@ AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"]) AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"]) -AM_CONDITIONAL([BUILD_TOOLS_HL_CONDITIONAL], [test "X$HDF5_HL_TOOLS" = "Xyes"]) AM_CONDITIONAL([BUILD_TOOLS_HL_GIF_CONDITIONAL], [test "X$HDF5_HL_GIF_TOOLS" = "Xyes"]) AM_CONDITIONAL([BUILD_DOXYGEN_CONDITIONAL], [test "X$HDF5_DOXYGEN" = "Xyes"]) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index 6c5ad70..a777b72 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -17,15 +17,7 @@ add_subdirectory (src) # Build HDF5 Tools if (HDF5_BUILD_TOOLS) - #----------------------------------------------------------------------------- - #-- Option to build the High level Tools - #----------------------------------------------------------------------------- - if (EXISTS "${HDF5_HL_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_HL_SOURCE_DIR}/tools") - option (HDF5_BUILD_HL_TOOLS "Build HDF5 HL Tools" ON) - if (HDF5_BUILD_HL_TOOLS) - add_subdirectory (tools) - endif () - endif () + add_subdirectory (tools) endif () #-- Add High Level Examples diff --git a/hl/Makefile.am b/hl/Makefile.am index 3cf8778..5660b9b 100644 --- a/hl/Makefile.am +++ b/hl/Makefile.am @@ -36,14 +36,10 @@ else TEST_DIR = endif if BUILD_TOOLS_CONDITIONAL -if BUILD_TOOLS_HL_CONDITIONAL TOOLS_DIR = tools else TOOLS_DIR = endif -else - TOOLS_DIR = -endif ## Don't recurse into any subdirectories if HDF5 is not configured to ## use the HL library diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 7df2b79..a369d9e 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,14 +1,12 @@ cmake_minimum_required (VERSION 3.18) project (HDF5_HL_TOOLS C) - #----------------------------------------------------------------------------- - #-- Option to build the High level GIF Tools - #----------------------------------------------------------------------------- - if (EXISTS "${HDF5_HL_SOURCE_DIR}/gif2h5" AND IS_DIRECTORY "${HDF5_HL_SOURCE_DIR}/gif2h5") - option (HDF5_BUILD_HL_GIF_TOOLS "Build HDF5 HL GIF Tools" OFF) - if (HDF5_BUILD_HL_GIF_TOOLS) - add_subdirectory (gif2h5) - endif () - endif () +#----------------------------------------------------------------------------- +#-- Option to build the High level GIF Tools +#----------------------------------------------------------------------------- +option (HDF5_BUILD_HL_GIF_TOOLS "Build HDF5 HL GIF Tools" OFF) +if (HDF5_BUILD_HL_GIF_TOOLS) + add_subdirectory (gif2h5) +endif () add_subdirectory (h5watch) diff --git a/hl/tools/Makefile.am b/hl/tools/Makefile.am index f3fe0d3..9f93f67 100644 --- a/hl/tools/Makefile.am +++ b/hl/tools/Makefile.am @@ -25,6 +25,6 @@ else endif # All subdirectories -SUBDIRS=$(TOOLS_DIR) h5watch +SUBDIRS=h5watch $(TOOLS_GIF_DIR) include $(top_srcdir)/config/conclude.am diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 9e95bd3..32c82b9 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -75,6 +75,7 @@ Features: Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@ Build HDF5 Tests: @HDF5_TESTS@ Build HDF5 Tools: @HDF5_TOOLS@ + Build GIF Tools: @HDF5_HL_GIF_TOOLS@ Threadsafety: @THREADSAFE@ Default API mapping: @DEFAULT_API_VERSION@ With deprecated public symbols: @DEPRECATED_SYMBOLS@ -- cgit v0.12