From ab2adc68da531c324fae2b659329e3fa4d977bb8 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 20 Mar 2024 11:25:36 -0600 Subject: [PATCH] A bit of cleanup for now, more to follow, but moving on to other roadblocks. --- CMakeLists.txt | 2 +- cmake/deprecated.cmake | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41dc253f8..89c6fd9b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1718,7 +1718,7 @@ message(STATUS ${LIBNETCDF_SETTINGS}) ### if(DEFINED DEPR_OPT) - message(STATUS ${DEPR_OPT}) + message(WARNING "Warning! Deprecated Options used. Please migrate your build system as follows:\n${DEPR_OPT}" ) endif() # Install libnetcdf.settings file into same location # as the libraries. diff --git a/cmake/deprecated.cmake b/cmake/deprecated.cmake index 350970cff..caa4c61c7 100644 --- a/cmake/deprecated.cmake +++ b/cmake/deprecated.cmake @@ -12,20 +12,16 @@ function(check_depr_opt arg) if(DEFINED ${arg}) - if(NOT DEFINED DEPR_OPT) - set(DEPR_OPT "Warning! Deprecated Options used. Please migrate your build system as follows:" CACHE INTERNAL "" FORCE) - endif() - #message(STATUS "arg: ${arg} - ${${arg}}") + set(val ${${arg}}) - #MESSAGE("val: ${val}") message(WARNING "${arg} is deprecated and will be removed. Please use NETCDF_${arg} in the future") - set(NETCDF_${arg} ${val} CACHE INTERNAL "" FORCE) + set(NETCDF_${arg} ${val} PARENT_SCOPE) set(DEPR_OPT "${DEPR_OPT}\n\to ${arg} --> NETCDF_${arg}" PARENT_SCOPE) endif() endfunction() -MESSAGE(STATUS "Checking for Deprecated Options") +message(STATUS "Checking for Deprecated Options") list(APPEND opts BUILD_UTILITIES ENABLE_BENCHMARKS ENABLE_BYTERANGE ENABLE_CDF5 ENABLE_CONVERSION_WARNINGS) list(APPEND opts ENABLE_DAP ENABLE_DAP2 ENABLE_DAP4 ENABLE_DISKLESS ENABLE_DOXYGEN ENABLE_ERANGE_FILL) list(APPEND opts ENABLE_EXAMPLES ENABLE_EXAMPLES_TESTS ENABLE_EXTREME_NUMBERS ENABLE_FFIO ENABLE_FILTER_BLOSC)