@@ -34,27 +34,27 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
34
34
35
35
include (set_compiler_flag.cmake)
36
36
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.
39
39
set_compiler_flag(
40
40
_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
43
43
)
44
44
if (_cxx_std_flag)
45
- message (STATUS "Building with C++20 " )
45
+ message (STATUS "Building with C++23 " )
46
46
endif ()
47
47
else ()
48
48
set_compiler_flag(
49
49
_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
52
52
)
53
- message (STATUS "Building with C++17 " )
53
+ message (STATUS "Building with C++20 " )
54
54
endif ()
55
55
56
56
if (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." )
58
58
endif ()
59
59
60
60
OPTION (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"
74
74
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DSKIP_ON_WERROR" )
75
75
endif ()
76
76
elseif (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" )
78
78
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO" )
79
79
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
80
80
add_definitions (-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
0 commit comments