@@ -34,27 +34,27 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3434
3535include (set_compiler_flag.cmake)
3636
37- if (CPP20 )
38- # User requested C++17 , but compiler might not oblige.
37+ if (CPP23 )
38+ # User requested C++23 , but compiler might not oblige.
3939 set_compiler_flag(
4040 _cxx_std_flag CXX
41- "-std=c++2a " # this should work with GNU, Intel, PGI
42- "/std:c++20 " # this should work with MSVC
41+ "-std=c++23 " # this should work with GNU, Intel, PGI
42+ "/std:c++23 " # this should work with MSVC
4343 )
4444 if (_cxx_std_flag)
45- message (STATUS "Building with C++20 " )
45+ message (STATUS "Building with C++23 " )
4646 endif ()
4747else ()
4848 set_compiler_flag(
4949 _cxx_std_flag CXX REQUIRED
50- "-std=c++17 " # this should work with GNU, Intel, PGI
51- "/std:c++17 " # this should work with MSVC
50+ "-std=c++20 " # this should work with GNU, Intel, PGI
51+ "/std:c++20 " # this should work with MSVC
5252 )
53- message (STATUS "Building with C++17 " )
53+ message (STATUS "Building with C++20 " )
5454endif ()
5555
5656if (NOT _cxx_std_flag)
57- message (FATAL_ERROR "xtensor needs a C++17 -compliant compiler." )
57+ message (FATAL_ERROR "xtensor needs a C++20 -compliant compiler." )
5858endif ()
5959
6060OPTION (XTENSOR_ENABLE_WERROR "Turn on -Werror" OFF )
@@ -74,7 +74,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel"
7474 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DSKIP_ON_WERROR" )
7575 endif ()
7676elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
77- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} /MP /bigobj" )
77+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} /Zc:__cplusplus / MP /bigobj" )
7878 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO" )
7979 add_definitions (-D_CRT_SECURE_NO_WARNINGS)
8080 add_definitions (-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
0 commit comments