From 86b2e2fab699193aa607a9fe543e1b52a766ce68 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 28 Sep 2018 04:50:15 +0200 Subject: [PATCH] Allow configure checks to be run with more warnings --- cmake/checks/check_01_cxx_features.cmake | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index a9a6ce7ea0..80387a123a 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -269,6 +269,7 @@ IF(NOT DEFINED DEAL_II_WITH_CXX14 OR DEAL_II_WITH_CXX14) int main() { constexpr int max = std::max(0,1); + (void) max; } " DEAL_II_HAVE_CXX14_CONSTEXPR_STDMAXMIN) @@ -292,6 +293,7 @@ IF(NOT DEFINED DEAL_II_WITH_CXX14 OR DEAL_II_WITH_CXX14) int main() { foo bar; + (void) bar; } " DEAL_II_HAVE_CXX14_CLANGAUTODEBUG_BUG_OK) @@ -339,14 +341,8 @@ CHECK_CXX_SOURCE_COMPILES( #include #include - // type traits functionality - constexpr auto m0 = std::is_trivial::value; - constexpr auto m1 = std::is_standard_layout::value; - constexpr auto m2 = std::is_pod::value; - // thread_local storage specification - thread_local std::array p; - std::condition_variable c; + static thread_local std::array p; // Check the version language macro, but skip MSVC because // MSVC reports 199711 even in MSVC 2017. @@ -356,8 +352,17 @@ CHECK_CXX_SOURCE_COMPILES( int main() { + std::condition_variable c; p[0]; c.notify_all(); + + // type traits functionality + constexpr auto m0 = std::is_trivial::value; + (void) m0; + constexpr auto m1 = std::is_standard_layout::value; + (void) m1; + constexpr auto m2 = std::is_pod::value; + (void) m2; } " DEAL_II_HAVE_CXX11_FEATURES) @@ -385,7 +390,8 @@ CHECK_CXX_SOURCE_COMPILES( #include int main () { - char c = toupper('a'); + int c = toupper('a'); + (void) c; } " DEAL_II_HAVE_CXX11_MACOSXC99BUG_OK) -- 2.39.5