diff --git a/ecal/core/CMakeLists.txt b/ecal/core/CMakeLists.txt index 5c2b6e33d2..2bc7fd38ac 100644 --- a/ecal/core/CMakeLists.txt +++ b/ecal/core/CMakeLists.txt @@ -447,7 +447,10 @@ target_compile_definitions(${PROJECT_NAME}_c PUBLIC ASIO_STANDALONE ASIO_DISABLE_VISIBILITY - PRIVATE eCAL_EXPORTS) + PRIVATE + eCAL_EXPORTS + ECAL_NO_DEPRECATION_WARNINGS +) target_compile_definitions(${PROJECT_NAME} PUBLIC @@ -457,7 +460,9 @@ target_compile_definitions(${PROJECT_NAME} eCAL_EXPORTS $<$:ECAL_HAS_CLOCKLOCK_MUTEX> $<$:ECAL_HAS_ROBUST_MUTEX> - $<$:ECAL_USE_CLOCKLOCK_MUTEX>) + $<$:ECAL_USE_CLOCKLOCK_MUTEX> + ECAL_NO_DEPRECATION_WARNINGS +) if(ECAL_NPCAP_SUPPORT) target_compile_definitions(${PROJECT_NAME} diff --git a/ecal/core/include/ecal/ecal_deprecate.h b/ecal/core/include/ecal/ecal_deprecate.h index 0debb4f39c..c583fbbdd5 100644 --- a/ecal/core/include/ecal/ecal_deprecate.h +++ b/ecal/core/include/ecal/ecal_deprecate.h @@ -26,32 +26,35 @@ #include -#if ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 4, 0) +//uncomment this line if you do want to get deprecation warnings inside eCAL core +//#undef ECAL_NO_DEPRECATION_WARNINGS + +#if !defined(ECAL_NO_DEPRECATION_WARNINGS) && ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 4, 0) #define ECAL_DEPRECATE_SINCE_5_4(__message__) [[deprecated(__message__)]] //!< Deprecate the following function with eCAL Version 5.4.0 #else #define ECAL_DEPRECATE_SINCE_5_4(__message__) //!< Deprecate the following function with eCAL Version 5.4.0 #endif -#if ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 10, 0) +#if !defined(ECAL_NO_DEPRECATION_WARNINGS) && ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 10, 0) #define ECAL_DEPRECATE_SINCE_5_10(__message__) [[deprecated(__message__)]] //!< Deprecate the following function with eCAL Version 5.10.0 #else #define ECAL_DEPRECATE_SINCE_5_10(__message__) //!< Deprecate the following function with eCAL Version 5.10.0 #endif -#if ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 11, 0) +#if !defined(ECAL_NO_DEPRECATION_WARNINGS) && ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 11, 0) #define ECAL_DEPRECATE_SINCE_5_11(__message__) [[deprecated(__message__)]] //!< Deprecate the following function with eCAL Version 5.11.0 #else #define ECAL_DEPRECATE_SINCE_5_11(__message__) //!< Deprecate the following function with eCAL Version 5.11.0 #endif -#if ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 12, 0) +#if !defined(ECAL_NO_DEPRECATION_WARNINGS) && ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 12, 0) #define ECAL_DEPRECATE_SINCE_5_12(__message__) [[deprecated(__message__)]] //!< Deprecate the following function with eCAL Version 5.12.0 #else #define ECAL_DEPRECATE_SINCE_5_12(__message__) //!< Deprecate the following function with eCAL Version 5.12.0 #endif -#if ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 13, 0) +#if !defined(ECAL_NO_DEPRECATION_WARNINGS) && ECAL_VERSION_INTEGER >= ECAL_VERSION_CALCULATE(5, 13, 0) #define ECAL_DEPRECATE_SINCE_5_13(__message__) [[deprecated(__message__)]] //!< Deprecate the following function with eCAL Version 5.13.0 #else #define ECAL_DEPRECATE_SINCE_5_13(__message__) //!< Deprecate the following function with eCAL Version 5.13.0