From: Matthias Maier Date: Wed, 13 Nov 2013 17:27:33 +0000 (+0000) Subject: Add a configure check for a regression with icc-14.0.0 and libstdc++-4.7 in C++11... X-Git-Tag: v8.1.0~306 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c421a0123f42ddba6edbdf456fd007835b03e853;p=dealii.git Add a configure check for a regression with icc-14.0.0 and libstdc++-4.7 in C++11 mode git-svn-id: https://svn.dealii.org/trunk@31642 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/checks/check_03_compiler_bugs.cmake b/deal.II/cmake/checks/check_03_compiler_bugs.cmake index f2cc702cb0..a31f9f4824 100644 --- a/deal.II/cmake/checks/check_03_compiler_bugs.cmake +++ b/deal.II/cmake/checks/check_03_compiler_bugs.cmake @@ -314,15 +314,42 @@ CHECK_CXX_COMPILER_BUG( " DEAL_II_ICC_NUMERICLIMITS_BUG) -IF(DEAL_II_ICC_NUMERICLIMITS_BUG) +# +# icc-14.0.0 has an astonishing bug [1] where it hits an internal compiler +# error when run in C++11 mode with libstdc++-4.7 (from gcc). +# +# We just disable C++11 mode in this case +# +# [1] http://software.intel.com/en-us/forums/topic/472385 +# +# - Matthias Maier, 2013 +# +CHECK_CXX_COMPILER_BUG( + " + #include + template void foo() + { + std::vector data(100); + } + int main() + { + foo(); + } + " + DEAL_II_ICC_LIBSTDCPP47CXX11_BUG) + + +IF( DEAL_II_ICC_NUMERICLIMITS_BUG OR + DEAL_II_ICC_LIBSTDCPP47CXX11_BUG ) MESSAGE(STATUS - "DEAL_II_ICC_NUMERICLIMITS_BUG found, disabling c++11 support" + "Intel C++11 bug found, disabling C++11 support" ) STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}") SET(DEAL_II_CAN_USE_CXX1X FALSE) SET(DEAL_II_USE_CXX11 FALSE) ENDIF() + # # gcc-4.8.1 has some problems with the constexpr "vertices_per_cell" in the # definition of alternating_form_at_vertices.