From: Daniel Arndt Date: Thu, 10 Jan 2019 09:24:48 +0000 (+0100) Subject: Use more flags in [[fallthrough]] checks X-Git-Tag: v9.1.0-rc1~448^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7580%2Fhead;p=dealii.git Use more flags in [[fallthrough]] checks --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index 228f858ea3..bf1aedec3b 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -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()