]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use more flags in [[fallthrough]] checks 7580/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 10 Jan 2019 09:24:48 +0000 (10:24 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 10 Jan 2019 09:24:48 +0000 (10:24 +0100)
cmake/checks/check_01_cxx_features.cmake

index 228f858ea3a0af0edeffd77e44bfa9a9ec201f14..bf1aedec3bee4628ddb872403363d2ddc6d4897f 100644 (file)
@@ -569,8 +569,11 @@ UNSET_IF_CHANGED(CHECK_CXX_FEATURES_FLAGS_SAVED
 # but a compiler extension in earlier language versions: check both
 # possibilities here.
 #
+ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_FLAGS}")
+ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror -Wno-unused-command-line-argument")
+#
 # first try the attribute [[fallthrough]]
-ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror -Wextra ${DEAL_II_CXX_VERSION_FLAG}")
+#
 CHECK_CXX_SOURCE_COMPILES(
   "
   int main()
@@ -593,8 +596,10 @@ CHECK_CXX_SOURCE_COMPILES(
    DEAL_II_HAVE_CXX17_ATTRIBUTE_FALLTHROUGH
    )
 
+#
 # see if the current compiler configuration supports the GCC extension
 # __attribute__((fallthrough)) syntax instead
+#
 CHECK_CXX_SOURCE_COMPILES(
   "
   int main()

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.