From 3fe4618b36fc6819eba82fa8fbb38800c8f3d97c Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 5 Jan 2021 11:56:41 -0500 Subject: [PATCH] Switch to DEAL_II_DEPRECATED_EARLY --- cmake/checks/check_01_cxx_features.cmake | 5 +++++ cmake/setup_cached_variables.cmake | 5 +++++ include/deal.II/base/config.h.in | 1 + 3 files changed, 11 insertions(+) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index b75dd1ebae..53a43942b1 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -494,6 +494,11 @@ ELSEIF(DEAL_II_HAVE_ATTRIBUTE_DEPRECATED AND NOT DEAL_II_WITH_CUDA) ELSE() SET(DEAL_II_DEPRECATED " ") ENDIF() +IF(DEAL_II_EARLY_DEPRECATIONS) + SET(DEAL_II_DEPRECATED_EARLY ${DEAL_II_DEPRECATED}) +ELSE() + SET(DEAL_II_DEPRECATED_EARLY " ") +ENDIF() # diff --git a/cmake/setup_cached_variables.cmake b/cmake/setup_cached_variables.cmake index 3c31c6b11e..dd3f710600 100644 --- a/cmake/setup_cached_variables.cmake +++ b/cmake/setup_cached_variables.cmake @@ -165,6 +165,11 @@ OPTION(DEAL_II_UNITY_BUILD OFF) MARK_AS_ADVANCED(DEAL_II_UNITY_BUILD) +OPTION(DEAL_II_EARLY_DEPRECATIONS + "Enable deprecation warnings for features deprecated since the last release." + ON) +MARK_AS_ADVANCED(DEAL_II_EARLY_DEPRECATIONS) + SET(BUILD_SHARED_LIBS "ON" CACHE BOOL "Build a shared library" ) diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index d229826b27..27e0d959e1 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -150,6 +150,7 @@ #cmakedefine DEAL_II_CXX14_CONSTEXPR_BUG #cmakedefine DEAL_II_DEPRECATED @DEAL_II_DEPRECATED@ +#cmakedefine DEAL_II_DEPRECATED_EARLY @DEAL_II_DEPRECATED_EARLY@ #cmakedefine DEAL_II_FALLTHROUGH @DEAL_II_FALLTHROUGH@ #cmakedefine DEAL_II_CONSTEXPR @DEAL_II_CONSTEXPR@ -- 2.39.5