diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d50e367..0a91b1e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -78,7 +78,7 @@ jobs: echo "which tar" which tar export TAR="/usr/bin/tar" - R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor', configure.args = '--novendor')" + R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor_0.27', configure.args = '--novendor')" - name: print R HOME run: | @@ -96,7 +96,7 @@ jobs: if [[ "${{matrix.sys.compiler}}" = "gcc" ]]; then export CC=gcc-${{matrix.sys.version}}; export CXX=g++-${{matrix.sys.version}}; else export CC=clang; export CXX=clang++; fi mkdir ~/.R touch ~/.R/Makevars - echo "CXX17=$CXX" >> ~/.R/Makevars - echo "CXX17FLAGS=-fPIC -O2" >> ~/.R/Makevars + echo "CXX20=$CXX" >> ~/.R/Makevars + echo "CXX20FLAGS=-fPIC -O2 -std=c++20" >> ~/.R/Makevars Rscript ./unittest.R diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 71ab857..3a13282 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -51,7 +51,7 @@ jobs: echo "which tar" which tar export TAR="/usr/bin/tar" - R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor', configure.args = '--novendor')" + R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor_0.27', configure.args = '--novendor')" - name: print R HOME run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 371b123..a0dcc01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,8 @@ set(XTENSOR_R_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) # Versionning # =========== -set(XTENSOR_REQUIRED_VERSION 0.26.0) -set(XTL_REQUIRED_VERSION 0.8.0) +set(XTENSOR_REQUIRED_VERSION 0.27.1) +set(XTL_REQUIRED_VERSION 0.8.1) set(XTENSOR_R_CONFIG_FILE "${XTENSOR_R_INCLUDE_DIR}/xtensor-r/xtensor_r_config.hpp") @@ -57,7 +57,7 @@ add_library(xtensor-r INTERFACE) target_include_directories(xtensor-r INTERFACE $ $) -target_compile_features(xtensor-r INTERFACE cxx_std_17) +target_compile_features(xtensor-r INTERFACE cxx_std_20) target_link_libraries(xtensor-r INTERFACE xtensor) get_target_property(inc_dir xtensor-r INTERFACE_INCLUDE_DIRECTORIES) diff --git a/environment-dev.yml b/environment-dev.yml index 04ae19d..c7dc7ce 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - cmake - - xtensor=0.26.0 + - xtensor=0.27.1 - r-base - r-rcpp # test dependencies diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7c07bc4..3e43a44 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,13 +32,13 @@ include(CheckCXXCompilerFlag) string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wunused-parameter -Wextra -Wreorder -Wconversion") - CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wunused-parameter -Wextra -Wreorder -Wconversion -D_LIBCPP_DISABLE_AVAILABILITY") + CHECK_CXX_COMPILER_FLAG("-std=c++20" HAS_CPP20_FLAG) - if (HAS_CPP17_FLAG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + if (HAS_CPP20_FLAG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20") else() - message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++17 support!") + message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++20 support!") endif() endif() diff --git a/test/rcpp_tests.cpp b/test/rcpp_tests.cpp index 7914fc1..2932203 100644 --- a/test/rcpp_tests.cpp +++ b/test/rcpp_tests.cpp @@ -7,7 +7,7 @@ * The full license is in the file LICENSE, distributed with this software. * ****************************************************************************/ -// [[Rcpp::plugins(cpp17)]] +// [[Rcpp::plugins(cpp20)]] // [[Rcpp::depends(xtensor)]] #include "xtensor-r/rcontainer.hpp"