From 4b7116dbef630265f67df7121b8daedcc032bd80 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 14 Apr 2017 08:58:57 -0400 Subject: [PATCH] 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. --- cmake/checks/check_01_cxx_features.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5