88############################################################################
99
1010cmake_minimum_required (VERSION 3.29 )
11+
12+ # Otherwise adds std=gnu++17 on OSX ...
13+ set (CMAKE_CXX_EXTENSIONS OFF )
14+
1115project (xtensor-blas)
1216
17+ # Otherwise adds flags for C++11 standard on OSX ...
18+ if (NOT CMAKE_CXX_STANDARD )
19+ set (CMAKE_CXX_STANDARD 20)
20+ endif ()
21+ message (STATUS "🔧 C++ standard: ${CMAKE_CXX_STANDARD} " )
22+
23+
1324set (INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /include)
1425set (XTENSOR_BLAS_INCLUDE_DIR ${INCLUDE_DIR} )
1526
@@ -44,7 +55,7 @@ message(STATUS "xtensor-blas v${${PROJECT_NAME}_VERSION}")
4455# Dependencies
4556# ============
4657
47- set (xtensor_REQUIRED_VERSION 0.26 .0)
58+ set (xtensor_REQUIRED_VERSION 0.27 .0)
4859if (TARGET xtensor)
4960 set (xtensor_VERSION ${XTENSOR_VERSION_MAJOR} .${XTENSOR_VERSION_MINOR} .${XTENSOR_VERSION_PATCH} )
5061 # Note: This is not SEMVER compatible comparison
@@ -77,6 +88,8 @@ target_include_directories(xtensor-blas
7788 $<BUILD_INTERFACE :${XTENSOR_BLAS_INCLUDE_DIR} >
7889 $<INSTALL_INTERFACE :include >)
7990
91+ target_compile_features (xtensor-blas INTERFACE cxx_std_20 )
92+
8093OPTION (CXXBLAS_DEBUG "print cxxblas debug information" OFF )
8194OPTION (XTENSOR_USE_FLENS_BLAS "use FLENS generic implementation instead of cblas" OFF )
8295# Decide whether to use OpenBLAS or not.
@@ -101,6 +114,8 @@ endif()
101114OPTION (BUILD_TESTS "xtensor-blas test suite" OFF )
102115OPTION (BUILD_BENCHMARK "xtensor-blas test suite" OFF )
103116
117+ OPTION (CPP23 "enables C++23 (experimental)" OFF )
118+
104119if (BUILD_TESTS)
105120 enable_testing ()
106121 include_directories (${XTENSOR_BLAS_INCLUDE_DIR} )
0 commit comments