File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ RcppParallelLibs <- function() {
1717inlineCxxPlugin <- function () {
1818 list (
1919 env = list (
20- PKG_CXXFLAGS = " -DRCPP_PARALLEL_USE_TBB=1 " ,
20+ PKG_CXXFLAGS = tbbCxxFlags() ,
2121 PKG_LIBS = tbbLdFlags()
2222 ),
2323 includes = " #include <RcppParallel.h>" ,
@@ -27,6 +27,12 @@ inlineCxxPlugin <- function() {
2727 )
2828}
2929
30+ tbbCxxFlags <- function () {
31+ if (Sys.info()[' sysname' ] == " Windows" )
32+ " -DRCPP_PARALLEL_USE_TBB=1"
33+ else
34+ " "
35+ }
3036
3137# Return the linker flags requried for TBB on this platform
3238tbbLdFlags <- function () {
@@ -39,7 +45,6 @@ tbbLdFlags <- function() {
3945 }
4046}
4147
42-
4348# Determine the platform-specific path to the TBB library
4449tbbLibPath <- function () {
4550 sysname <- Sys.info()[' sysname' ]
You can’t perform that action at this time.
0 commit comments