File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ target_include_directories(xtensor-blas
7777 $<BUILD_INTERFACE:${XTENSOR_BLAS_INCLUDE_DIR} >
7878 $<INSTALL_INTERFACE:include >)
7979
80+ target_compile_features (xtensor-blas INTERFACE cxx_std_20)
81+
8082OPTION (CXXBLAS_DEBUG "print cxxblas debug information" OFF )
8183OPTION (XTENSOR_USE_FLENS_BLAS "use FLENS generic implementation instead of cblas" OFF )
8284# Decide whether to use OpenBLAS or not.
@@ -101,6 +103,8 @@ endif()
101103OPTION (BUILD_TESTS "xtensor-blas test suite" OFF )
102104OPTION (BUILD_BENCHMARK "xtensor-blas test suite" OFF )
103105
106+ OPTION (CPP23 "enables C++23 (experimental)" OFF )
107+
104108if (BUILD_TESTS)
105109 enable_testing ()
106110 include_directories (${XTENSOR_BLAS_INCLUDE_DIR} )
Original file line number Diff line number Diff line change @@ -36,27 +36,27 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3636
3737include (set_compiler_flag.cmake)
3838
39- if (CPP20 )
39+ if (CPP23 )
4040 # User requested C++20, but compiler might not oblige.
4141 set_compiler_flag(
4242 _cxx_std_flag CXX
43- "-std=c++20 " # this should work with GNU, Intel, PGI
44- "/std:c++20 " # this should work with MSVC
43+ "-std=c++23 " # this should work with GNU, Intel, PGI
44+ "/std:c++23 " # this should work with MSVC
4545 )
4646 if (_cxx_std_flag)
47- message (STATUS "Building with C++20 " )
47+ message (STATUS "Building with C++23 " )
4848 endif ()
4949else ()
5050 set_compiler_flag(
5151 _cxx_std_flag CXX REQUIRED
52- "-std=c++17 " # this should work with GNU, Intel, PGI
53- "/std:c++17 " # this should work with MSVC
52+ "-std=c++20 " # this should work with GNU, Intel, PGI
53+ "/std:c++20 " # this should work with MSVC
5454 )
55- message (STATUS "Building with C++17 " )
55+ message (STATUS "Building with C++20 " )
5656endif ()
5757
5858if (NOT _cxx_std_flag)
59- message (FATAL_ERROR "xtensor-blas needs a C++17 -compliant compiler." )
59+ message (FATAL_ERROR "xtensor-blas needs a C++20 -compliant compiler." )
6060endif ()
6161
6262if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32 ))
You can’t perform that action at this time.
0 commit comments