From f45d01becc002b99a426f953fddb9e5bc59185a6 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 16 Sep 2019 09:25:29 -0400 Subject: [PATCH] improve check for CAN_CALL_NONCONSTEXPR On intel 19.0.5, the check DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR passes but compilation of an assert (and as such a throw call) fails. Improve the test to catch this. I can confirm that clang6 still passes this check as before. fixes #8758 --- cmake/checks/check_01_cxx_features.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index e94d944885..6eb67b2191 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -733,12 +733,14 @@ CHECK_CXX_SOURCE_COMPILES( # CHECK_CXX_SOURCE_COMPILES( " + #define Assert(x,y) if (!(x)) throw y; void bar() {} constexpr int foo(const int n) { + Assert(n>0, \"hello\"); if(!(n >= 0)) bar(); return n; -- 2.39.5