Skip to content

Commit 1abf107

Browse files
committed
recommend and use Rscript --vanilla when capturing output for compiling
1 parent 91fbefe commit 1abf107

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

R/build.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# inlineCxxPlugin (defined below) and to packages via a line in Makevars[.win]
55
# like this:
66
#
7-
# PKG_CXXFLAGS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::CxxFlags()")
7+
# PKG_CXXFLAGS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla -e "RcppParallel::CxxFlags()")
88
#
99
CxxFlags <- function() {
1010
cat(tbbCxxFlags())
@@ -15,7 +15,7 @@ CxxFlags <- function() {
1515
# to sourceCpp via the inlineCxxPlugin (defined below) and to packages
1616
# via a line in Makevars[.win] like this:
1717
#
18-
# PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::LdFlags()")
18+
# PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla -e "RcppParallel::LdFlags()")
1919
#
2020
LdFlags <- function() {
2121
cat(tbbLdFlags())

R/skeleton.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RcppParallel.package.skeleton <- function(name = "anRpackage",
5757
cat(
5858
c(
5959
'CXX_STD = CXX11',
60-
'PKG_LIBS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()")'
60+
'PKG_LIBS += $(shell ${R_HOME}/bin/Rscript --vanilla -e "RcppParallel::RcppParallelLibs()")'
6161
),
6262
file = "src/Makevars",
6363
sep = "\n"
@@ -69,7 +69,7 @@ RcppParallel.package.skeleton <- function(name = "anRpackage",
6969
c(
7070
'CXX_STD = CXX11',
7171
'PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1',
72-
'PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::RcppParallelLibs()")'
72+
'PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla -e "RcppParallel::RcppParallelLibs()")'
7373
),
7474
file = "src/Makevars.win",
7575
sep = "\n"

man/RcppParallelFlags.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RcppParallelLibs()
1717
\details{
1818
These functions are typically called from \code{Makevars} as follows:
1919

20-
\code{PKG_LIBS += $(shell "${R_HOME}/bin/Rscript/" -e "RcppParallel::LdFlags()")}
20+
\code{PKG_LIBS += $(shell "${R_HOME}/bin/Rscript" --vanilla -e "RcppParallel::LdFlags()")}
2121

2222
}
2323

src/Makevars.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ endif
6161

6262
# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
6363
ifeq ($(USE_TBB), SunOS)
64-
R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
64+
R_32BIT = $(shell ${R_HOME}/bin/Rscript --vanilla -e 'cat(.Machine$$sizeof.pointer == 4)')
6565
ifeq ($(R_32BIT), TRUE)
6666
MAKE_ARGS += arch=ia32
6767
endif

0 commit comments

Comments
 (0)