From f971d2adfe00663a7640e767bcdfad71b83f2ed2 Mon Sep 17 00:00:00 2001 From: maier Date: Fri, 18 Jan 2013 15:41:27 +0000 Subject: [PATCH] Cleanup: Just search for support for the deprecated attribute, don't check whether it is silently ignored git-svn-id: https://svn.dealii.org/branches/branch_cmake@28131 0785d39b-7218-0410-832d-ea1e28bc413d --- .../checks/check_01_compiler_features.cmake | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/deal.II/cmake/checks/check_01_compiler_features.cmake b/deal.II/cmake/checks/check_01_compiler_features.cmake index ce0a4e40d3..3a4bb1c639 100644 --- a/deal.II/cmake/checks/check_01_compiler_features.cmake +++ b/deal.II/cmake/checks/check_01_compiler_features.cmake @@ -358,29 +358,12 @@ CHECK_CXX_SOURCE_COMPILES( int main () {} " - DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED) + DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED + ) -# ...and then verify whether it actually errors out if -# -Werror is given -PUSH_TEST_FLAG("-Werror") -CHECK_CXX_SOURCE_COMPILES( - " - int old_fn () __attribute__((deprecated)); - int old_fn () { return 0; } - int (*fn_ptr)() = old_fn; - - int main () {} - " - DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED_WARNING) -POP_TEST_FLAG() - -IF(DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED - AND - (NOT DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED_WARNING)) - MESSAGE(STATUS "Compiler supports the deprecated attribute") +IF(DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED) SET(DEAL_II_DEPRECATED "__attribute__((deprecated))") ELSE() - MESSAGE(STATUS "Compiler does not support the deprecated attribute") SET(DEAL_II_DEPRECATED " ") ENDIF() -- 2.39.5