File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ expand_template(
3232 "#cmakedefine CATCH_CONFIG_CPP17_STRING_VIEW" : "" ,
3333 "#cmakedefine CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS" : "" ,
3434 "#cmakedefine CATCH_CONFIG_CPP17_VARIANT" : "" ,
35+ "#cmakedefine CATCH_CONFIG_DEPRECATED_ANNOTATIONS" : "" ,
3536 "#cmakedefine CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER" : "" ,
3637 "#cmakedefine CATCH_CONFIG_DISABLE_EXCEPTIONS" : "" ,
3738 "#cmakedefine CATCH_CONFIG_DISABLE_STRINGIFICATION" : "" ,
@@ -55,6 +56,7 @@ expand_template(
5556 "#cmakedefine CATCH_CONFIG_NO_CPP17_STRING_VIEW" : "" ,
5657 "#cmakedefine CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS" : "" ,
5758 "#cmakedefine CATCH_CONFIG_NO_CPP17_VARIANT" : "" ,
59+ "#cmakedefine CATCH_CONFIG_NO_DEPRECATED_ANNOTATIONS" : "" ,
5860 "#cmakedefine CATCH_CONFIG_NO_GETENV" : "" ,
5961 "#cmakedefine CATCH_CONFIG_NO_GLOBAL_NEXTAFTER" : "" ,
6062 "#cmakedefine CATCH_CONFIG_NO_POSIX_SIGNALS" : "" ,
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ set(_OverridableOptions
4444 "GETENV"
4545 "EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT"
4646 "USE_BUILTIN_CONSTANT_P"
47+ "DEPRECATED_ANNOTATIONS"
4748)
4849
4950foreach (OptionName ${_OverridableOptions} )
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ set(IMPL_HEADERS
8585 ${SOURCES_DIR} /internal /catch_debug_console.hpp
8686 ${SOURCES_DIR} /internal /catch_debugger.hpp
8787 ${SOURCES_DIR} /internal /catch_decomposer.hpp
88+ ${SOURCES_DIR} /internal /catch_deprecation_macro.hpp
8889 ${SOURCES_DIR} /internal /catch_enforce.hpp
8990 ${SOURCES_DIR} /internal /catch_enum_values_registry.hpp
9091 ${SOURCES_DIR} /internal /catch_errno_guard.hpp
Original file line number Diff line number Diff line change 6666#include < catch2/internal/catch_debug_console.hpp>
6767#include < catch2/internal/catch_debugger.hpp>
6868#include < catch2/internal/catch_decomposer.hpp>
69+ #include < catch2/internal/catch_deprecation_macro.hpp>
6970#include < catch2/internal/catch_enforce.hpp>
7071#include < catch2/internal/catch_enum_values_registry.hpp>
7172#include < catch2/internal/catch_errno_guard.hpp>
Original file line number Diff line number Diff line change 187187#endif
188188
189189
190+ #cmakedefine CATCH_CONFIG_DEPRECATED_ANNOTATIONS
191+ #cmakedefine CATCH_CONFIG_NO_DEPRECATED_ANNOTATIONS
192+
193+ #if defined( CATCH_CONFIG_DEPRECATED_ANNOTATIONS ) && \
194+ defined( CATCH_CONFIG_NO_DEPRECATED_ANNOTATIONS )
195+ # error Cannot force DEPRECATED_ANNOTATIONS to both ON and OFF
196+ #endif
197+
198+
199+
190200// ------
191201// Simple toggle defines
192202// their value is never used and they cannot be overridden
Original file line number Diff line number Diff line change 1+
2+ // Copyright Catch2 Authors
3+ // Distributed under the Boost Software License, Version 1.0.
4+ // (See accompanying file LICENSE.txt or copy at
5+ // https://www.boost.org/LICENSE_1_0.txt)
6+
7+ // SPDX-License-Identifier: BSL-1.0
8+ #ifndef CATCH_DEPRECATION_MACRO_HPP_INCLUDED
9+ #define CATCH_DEPRECATION_MACRO_HPP_INCLUDED
10+
11+ #include < catch2/catch_user_config.hpp>
12+
13+ #if !defined( CATCH_CONFIG_NO_DEPRECATED_ANNOTATIONS )
14+ # define DEPRECATED ( msg ) [[deprecated( msg )]]
15+ #else
16+ # define DEPRECATED ( msg )
17+ #endif
18+
19+ #endif // CATCH_DEPRECATION_MACRO_HPP_INCLUDED
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ internal_headers = [
9292 ' internal/catch_debug_console.hpp' ,
9393 ' internal/catch_debugger.hpp' ,
9494 ' internal/catch_decomposer.hpp' ,
95+ ' internal/catch_deprecation_macro.hpp' ,
9596 ' internal/catch_enforce.hpp' ,
9697 ' internal/catch_enum_values_registry.hpp' ,
9798 ' internal/catch_errno_guard.hpp' ,
You can’t perform that action at this time.
0 commit comments