Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

2 changes: 1 addition & 1 deletion .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -57,7 +57,7 @@ add_library(xtensor-r INTERFACE)
target_include_directories(xtensor-r INTERFACE $<BUILD_INTERFACE:${XTENSOR_R_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)

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)
Expand Down
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- cmake
- xtensor=0.26.0
- xtensor=0.27.1
- r-base
- r-rcpp
# test dependencies
Expand Down
10 changes: 5 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion test/rcpp_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading