File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,5 @@ src-x64
1313tbb.log
1414
1515R /tbb-autodetected.R
16+ src /install.libs.R
17+
Original file line number Diff line number Diff line change 22# !diagnostics suppress=R_PACKAGE_DIR,SHLIB_EXT,R_ARCH
33.install.libs <- function() {
44
5+ # get TBB library path
6+ tbbLib <- "@TBB_LIB@"
7+
58 # copy default library
69 files <- Sys.glob(paste0("*", SHLIB_EXT))
710 dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH))
2225 tbbDest <- file.path(R_PACKAGE_DIR, paste0("lib", R_ARCH))
2326 dir.create(tbbDest, recursive = TRUE, showWarnings = FALSE)
2427
25- # check for bundled vs. system tbb
26- tbbRoot <- Sys.getenv(" TBB_ROOT" , unset = NA )
27-
28- tbbLib <- Sys.getenv(" TBB_LIB" , unset = NA )
29- if (is.na(tbbLib ) && ! is.na(tbbRoot ))
30- tbbLib <- file.path(tbbRoot , " lib" )
31-
3228 # note: on Linux, TBB gets compiled with extensions like
3329 # '.so.2', so be ready to handle those
3430 shlibPattern <- switch(
3834 "^libtbb.*\\.so.*$"
3935 )
4036
41- if (is.na (tbbLib )) {
37+ if (!nzchar (tbbLib)) {
4238
4339 # using bundled TBB
4440 tbbLibs <- list.files(
6662 tbbLibs <- tbbLibs[!nzchar(Sys.readlink(tbbLibs))]
6763
6864 # copy / link the libraries
65+ writeLines(paste("*", tbbLibs))
6966 useSymlinks <- Sys.getenv("TBB_USE_SYMLINKS", unset = "TRUE")
7067 if (useSymlinks)
7168 file.symlink(tbbLibs, tbbDest)
You can’t perform that action at this time.
0 commit comments