Skip to content

Commit 7365d80

Browse files
committed
feat: Use c++20 in tests
- Previously, tests was in c++17 - We want to add c++20 by default, so I modify the test cmake - The tests passed locally
1 parent 46889a4 commit 7365d80

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3434

3535
include(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++20, 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()
4747
else()
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")
5454
endif()
5555

5656
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.")
5858
endif()
5959

6060
OPTION(XTENSOR_ENABLE_WERROR "Turn on -Werror" OFF)

0 commit comments

Comments
 (0)