From 1d93fd58b46f83b192678b28bf7a411fe84b0eaa Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 16 May 2024 17:10:15 +0300 Subject: [PATCH 1/2] Add RcppParallel cxxflags to makevars --- src/Makevars | 1 + src/Makevars.win | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Makevars b/src/Makevars index 9f1dcca1..c55a57fb 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,4 +1,5 @@ PKG_CXXFLAGS += -DRCPP_USE_UNWIND_PROTECT +KG_CXXFLAGS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::CxxFlags()") # Needed due to RcppArmadillo PKG_LIBS += $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index 4a26f1e3..9ba74ae8 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,5 @@ PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1 +PKG_CXXFLAGS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::CxxFlags()") # Needed due to RcppArmadillo PKG_LIBS += $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) From 92688fc293e465bfd447a2bd2a9aa5a0c4fcbb2d Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 16 May 2024 21:45:42 +0300 Subject: [PATCH 2/2] Tidy --- src/Makevars | 2 +- src/Makevars.win | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Makevars b/src/Makevars index c55a57fb..7e82752b 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,5 +1,5 @@ PKG_CXXFLAGS += -DRCPP_USE_UNWIND_PROTECT -KG_CXXFLAGS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::CxxFlags()") +PKG_CXXFLAGS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::CxxFlags()") # Needed due to RcppArmadillo PKG_LIBS += $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index 9ba74ae8..7b482291 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,3 @@ -PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1 PKG_CXXFLAGS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::CxxFlags()") # Needed due to RcppArmadillo