From: Daniel Arndt Date: Fri, 28 Sep 2018 02:50:15 +0000 (+0200) Subject: Allow configure checks to be run with more warnings X-Git-Tag: v9.1.0-rc1~675^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Ffix_warnings_in_configure_checks;p=dealii.git Allow configure checks to be run with more warnings --- 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)