Skip to content

Commit

Permalink
sync with upstream; be explicit about -std=c++17
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Dec 5, 2022
1 parent d453742 commit cc81b3d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
@echo on

bash %RECIPE_DIR%/build_win.sh
IF %ERRORLEVEL% NEQ 0 exit 1

cp %RECIPE_DIR%/configure.win r
IF %ERRORLEVEL% NEQ 0 exit 1

cp %RECIPE_DIR%/install.libs.R r/src
IF %ERRORLEVEL% NEQ 0 exit 1

set "MAKEFLAGS=-j%CPU_COUNT%"
"%R%" CMD INSTALL --build r
IF %ERRORLEVEL% NEQ 0 exit 1
9 changes: 9 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
set -ex

export DISABLE_AUTOBREW=1

# set C++17 due to abseil
export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -std=c++17"

if [[ "${target_platform}" == osx-* ]]; then
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
export ARROW_R_CXXFLAGS="${ARROW_R_CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
fi

# shellcheck disable=SC2086
${R} CMD INSTALL --build r/. ${R_ARGS}
5 changes: 2 additions & 3 deletions recipe/configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

set -euxo pipefail

# Remove the -I../inst/include/ when unvendoring cpp11 in ARROW-13610
echo "PKG_CPPFLAGS=-DNDEBUG -I\"${LIBRARY_PREFIX}/include\" -I\"${PREFIX}/include\" -DARROW_R_WITH_ARROW -DARROW_R_WITH_PARQUET -DARROW_R_WITH_DATASET -DARROW_R_WITH_S3 -DARROW_R_WITH_JSON -I../inst/include/" > src/Makevars.win
echo "PKG_CPPFLAGS=-DNDEBUG -I\"${LIBRARY_PREFIX}/include\" -I\"${PREFIX}/include\" -DARROW_R_WITH_PARQUET -DARROW_R_WITH_DATASET -DARROW_R_WITH_S3 -DARROW_R_WITH_JSON" > src/Makevars.win
echo "PKG_CXXFLAGS=\$(CXX_VISIBILITY)" >> src/Makevars.win
echo 'CXX_STD=CXX11' >> src/Makevars.win
echo 'CXX_STD=CXX17' >> src/Makevars.win
echo "PKG_LIBS=-L\"${LIBRARY_PREFIX}/lib\" -larrow_dataset -lparquet -larrow" >> src/Makevars.win

0 comments on commit cc81b3d

Please sign in to comment.