]> https://gitweb.dealii.org/ - dealii.git/commitdiff
reorder deprecation feature check 6438/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 3 May 2018 20:08:40 +0000 (16:08 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 3 May 2018 20:08:40 +0000 (16:08 -0400)
This moves the check of compiler features after the std standard
detection and checks that the checks compile with the correct flags to
be used later without warnings.

cmake/checks/check_02_compiler_features.cmake [moved from cmake/checks/check_01_compiler_features.cmake with 96% similarity]

similarity index 96%
rename from cmake/checks/check_01_compiler_features.cmake
rename to cmake/checks/check_02_compiler_features.cmake
index e28afe5a70fcd4ce8fe85cf1145dba5dae9b94eb..9b25606212479729410a2b8ead30a4d8f050c318 100644 (file)
@@ -315,6 +315,15 @@ ENDIF()
 # - Wolfgang Bangerth, 2012
 #
 
+# some compilers compile the attributes but they do not work:
+# "warning: use of the 'deprecated' attribute is a C++14 extension" (clang in c++11 mode)
+# "warning #1292: unknown attribute "deprecated"" (icc)
+PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_FLAGS}")
+PUSH_CMAKE_REQUIRED("-Werror")
+PUSH_CMAKE_REQUIRED("-Wno-deprecated-declarations")
+PUSH_CMAKE_REQUIRED("-Wno-deprecated")
+PUSH_CMAKE_REQUIRED("-Wno-unused-command-line-argument")
+
 # first see if the compiler accepts the attribute
 CHECK_CXX_SOURCE_COMPILES(
   "
@@ -350,6 +359,8 @@ CHECK_CXX_SOURCE_COMPILES(
   DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED
   )
 
+RESET_CMAKE_REQUIRED()
+
 IF(DEAL_II_COMPILER_HAS_CXX14_ATTRIBUTE_DEPRECATED)
   SET(DEAL_II_DEPRECATED "[[deprecated]]")
 ELSEIF(DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.