mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
Skeleton for applying deprecation warnings
This commit is contained in:
@@ -85,6 +85,7 @@ set(IMPL_HEADERS
|
||||
${SOURCES_DIR}/internal/catch_debug_console.hpp
|
||||
${SOURCES_DIR}/internal/catch_debugger.hpp
|
||||
${SOURCES_DIR}/internal/catch_decomposer.hpp
|
||||
${SOURCES_DIR}/internal/catch_deprecation_macro.hpp
|
||||
${SOURCES_DIR}/internal/catch_enforce.hpp
|
||||
${SOURCES_DIR}/internal/catch_enum_values_registry.hpp
|
||||
${SOURCES_DIR}/internal/catch_errno_guard.hpp
|
||||
|
@@ -66,6 +66,7 @@
|
||||
#include <catch2/internal/catch_debug_console.hpp>
|
||||
#include <catch2/internal/catch_debugger.hpp>
|
||||
#include <catch2/internal/catch_decomposer.hpp>
|
||||
#include <catch2/internal/catch_deprecation_macro.hpp>
|
||||
#include <catch2/internal/catch_enforce.hpp>
|
||||
#include <catch2/internal/catch_enum_values_registry.hpp>
|
||||
#include <catch2/internal/catch_errno_guard.hpp>
|
||||
|
@@ -187,6 +187,16 @@
|
||||
#endif
|
||||
|
||||
|
||||
#cmakedefine CATCH_CONFIG_DEPRECATION_ANNOTATIONS
|
||||
#cmakedefine CATCH_CONFIG_NO_DEPRECATION_ANNOTATIONS
|
||||
|
||||
#if defined( CATCH_CONFIG_DEPRECATION_ANNOTATIONS ) && \
|
||||
defined( CATCH_CONFIG_NO_DEPRECATION_ANNOTATIONS )
|
||||
# error Cannot force DEPRECATION_ANNOTATIONS to both ON and OFF
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// ------
|
||||
// Simple toggle defines
|
||||
// their value is never used and they cannot be overridden
|
||||
|
19
src/catch2/internal/catch_deprecation_macro.hpp
Normal file
19
src/catch2/internal/catch_deprecation_macro.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
#ifndef CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
||||
#define CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
#if !defined( CATCH_CONFIG_NO_DEPRECATION_ANNOTATIONS )
|
||||
# define DEPRECATED( msg ) [[deprecated( msg )]]
|
||||
#else
|
||||
# define DEPRECATED( msg )
|
||||
#endif
|
||||
|
||||
#endif // CATCH_DEPRECATION_MACRO_HPP_INCLUDED
|
@@ -92,6 +92,7 @@ internal_headers = [
|
||||
'internal/catch_debug_console.hpp',
|
||||
'internal/catch_debugger.hpp',
|
||||
'internal/catch_decomposer.hpp',
|
||||
'internal/catch_deprecation_macro.hpp',
|
||||
'internal/catch_enforce.hpp',
|
||||
'internal/catch_enum_values_registry.hpp',
|
||||
'internal/catch_errno_guard.hpp',
|
||||
|
Reference in New Issue
Block a user