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.
@@ -104,6 +106,8 @@ OPTION(BUILD_BENCHMARK "xtensor-blas test suite" OFF)
104106OPTION (DOWNLOAD_GTEST "download gtest and build from source" OFF )
105107OPTION (DOWNLOAD_GBENCHMARK "download google benchmark and build from source" OFF )
106108
109+ OPTION (CPP23 "enables C++23 (experimental)" OFF )
110+
107111if (DOWNLOAD_GTEST OR GTEST_SRC_DIR)
108112 set (BUILD_TESTS ON )
109113endif ()
Original file line number Diff line number Diff line change @@ -33,27 +33,27 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3333
3434include (set_compiler_flag.cmake)
3535
36- if (CPP20 )
36+ if (CPP23 )
3737 # User requested C++20, but compiler might not oblige.
3838 set_compiler_flag(
3939 _cxx_std_flag CXX
40- "-std=c++20 " # this should work with GNU, Intel, PGI
41- "/std:c++20 " # this should work with MSVC
40+ "-std=c++23 " # this should work with GNU, Intel, PGI
41+ "/std:c++23 " # this should work with MSVC
4242 )
4343 if (_cxx_std_flag)
44- message (STATUS "Building with C++20 " )
44+ message (STATUS "Building with C++23 " )
4545 endif ()
4646else ()
4747 set_compiler_flag(
4848 _cxx_std_flag CXX REQUIRED
49- "-std=c++17 " # this should work with GNU, Intel, PGI
50- "/std:c++17 " # this should work with MSVC
49+ "-std=c++20 " # this should work with GNU, Intel, PGI
50+ "/std:c++20 " # this should work with MSVC
5151 )
52- message (STATUS "Building with C++17 " )
52+ message (STATUS "Building with C++20 " )
5353endif ()
5454
5555if (NOT _cxx_std_flag)
56- message (FATAL_ERROR "xtensor-blas needs a C++17 -compliant compiler." )
56+ message (FATAL_ERROR "xtensor-blas needs a C++20 -compliant compiler." )
5757endif ()
5858
5959if (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