diff --git a/.Rbuildignore b/.Rbuildignore index 17d29bca..493e59bb 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,5 +15,5 @@ ^tags$ ^tests/testthat/pkg/RcppParallelTest/src/.*\.dll$ ^tests/testthat/pkg/RcppParallelTest/src/.*\.s?o$ - +^tools/tbb$ ^\.github$ diff --git a/.gitignore b/.gitignore index 1f61ddad..c5c64888 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ src-x64 tbb.log R/tbb-autodetected.R +src/install.libs.R + diff --git a/DESCRIPTION b/DESCRIPTION index 3581a1aa..0ed21bc2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: RcppParallel Type: Package Title: Parallel Programming Tools for 'Rcpp' -Version: 5.1.6-9000 +Version: 5.1.7 Authors@R: c( person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"), person("Romain", "Francois", role = c("aut", "cph")), diff --git a/NEWS.md b/NEWS.md index ffbd0acf..5665cb81 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -## RcppParallel 5.1.7 (UNRELEASED) +## RcppParallel 5.1.7 * Remove deprecated `std::iterator`. (#192; @Enchufa2) diff --git a/src/install.libs.R b/src/install.libs.R.in similarity index 89% rename from src/install.libs.R rename to src/install.libs.R.in index ed7e43ad..20a3d451 100644 --- a/src/install.libs.R +++ b/src/install.libs.R.in @@ -2,6 +2,9 @@ # !diagnostics suppress=R_PACKAGE_DIR,SHLIB_EXT,R_ARCH .install.libs <- function() { + # get TBB library path + tbbLib <- "@TBB_LIB@" + # copy default library files <- Sys.glob(paste0("*", SHLIB_EXT)) dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH)) @@ -22,13 +25,6 @@ tbbDest <- file.path(R_PACKAGE_DIR, paste0("lib", R_ARCH)) dir.create(tbbDest, recursive = TRUE, showWarnings = FALSE) - # check for bundled vs. system tbb - tbbRoot <- Sys.getenv("TBB_ROOT", unset = NA) - - tbbLib <- Sys.getenv("TBB_LIB", unset = NA) - if (is.na(tbbLib) && !is.na(tbbRoot)) - tbbLib <- file.path(tbbRoot, "lib") - # note: on Linux, TBB gets compiled with extensions like # '.so.2', so be ready to handle those shlibPattern <- switch( @@ -38,7 +34,7 @@ "^libtbb.*\\.so.*$" ) - if (is.na(tbbLib)) { + if (!nzchar(tbbLib)) { # using bundled TBB tbbLibs <- list.files( diff --git a/tools/config/cleanup.R b/tools/config/cleanup.R index 5f1cf7c0..790edac1 100644 --- a/tools/config/cleanup.R +++ b/tools/config/cleanup.R @@ -5,3 +5,8 @@ unlink("src/tbb/build/lib_release", recursive = TRUE) unlink("inst/lib", recursive = TRUE) unlink("inst/libs", recursive = TRUE) +unlink("inst/include/index.html", recursive = TRUE) +unlink("inst/include/oneapi", recursive = TRUE) +unlink("inst/include/serial", recursive = TRUE) +unlink("inst/include/tbb", recursive = TRUE) + diff --git a/tools/config/configure.R b/tools/config/configure.R index 772ac36e..a25cab21 100644 --- a/tools/config/configure.R +++ b/tools/config/configure.R @@ -161,7 +161,7 @@ if (!is.na(tbbLib) && is.na(tbbInc)) { # if TBB_LIB and TBB_INC are still not defined, try auto-detecting tryAutoDetect <- .Platform$OS.type == "unix" && - Sys.getenv("TBB_AUTODETECT", unset = "TRUE") == "TRUE" && + Sys.getenv("TBB_AUTODETECT", unset = "FALSE") == "TRUE" && is.na(tbbLib) && is.na(tbbInc)