From: Timo Heister Date: Fri, 14 Apr 2017 12:58:57 +0000 (-0400) Subject: fix c++11 detection under MSVC X-Git-Tag: v9.0.0-rc1~1691^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4258%2Fhead;p=dealii.git fix c++11 detection under MSVC It turns out MSVC defines __cplusplus as 1997 even with MSVC 2017. Sigh. Instead of trying to parse what support we have, just skip this macro check and hope we catch all problems with the configuration tests itself. --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index fa7b3d31c4..58b8efde46 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -177,8 +177,9 @@ CHECK_CXX_SOURCE_COMPILES( thread_local std::array p; std::condition_variable c; - // check the version language macro - #if !(__cplusplus >= 201103L) + // Check the version language macro, but skip MSVC because + // MSVC reports 199711 even in MSVC 2017. + #if __cplusplus < 201103L && !defined(_MSC_VER) # error \"insufficient support for C++11\" #endif