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
13
13
tbb.log
14
14
15
15
R /tbb-autodetected.R
16
+ src /install.libs.R
17
+
Original file line number Diff line number Diff line change 2
2
# !diagnostics suppress=R_PACKAGE_DIR,SHLIB_EXT,R_ARCH
3
3
.install.libs <- function() {
4
4
5
+ # get TBB library path
6
+ tbbLib <- "@TBB_LIB@"
7
+
5
8
# copy default library
6
9
files <- Sys.glob(paste0("*", SHLIB_EXT))
7
10
dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH))
22
25
tbbDest <- file.path(R_PACKAGE_DIR, paste0("lib", R_ARCH))
23
26
dir.create(tbbDest, recursive = TRUE, showWarnings = FALSE)
24
27
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
-
32
28
# note: on Linux, TBB gets compiled with extensions like
33
29
# '.so.2', so be ready to handle those
34
30
shlibPattern <- switch(
38
34
"^libtbb.*\\.so.*$"
39
35
)
40
36
41
- if (is.na (tbbLib )) {
37
+ if (!nzchar (tbbLib)) {
42
38
43
39
# using bundled TBB
44
40
tbbLibs <- list.files(
66
62
tbbLibs <- tbbLibs[!nzchar(Sys.readlink(tbbLibs))]
67
63
68
64
# copy / link the libraries
65
+ writeLines(paste("*", tbbLibs))
69
66
useSymlinks <- Sys.getenv("TBB_USE_SYMLINKS", unset = "TRUE")
70
67
if (useSymlinks)
71
68
file.symlink(tbbLibs, tbbDest)
You can’t perform that action at this time.
0 commit comments