File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 2424 # '.so.2', so be ready to handle those
2525 shlibPattern <- switch (
2626 Sys.info()[[" sysname" ]],
27- Windows = " [.]dll$" ,
28- Darwin = " [.]dylib$" ,
29- " [.]so(?:[.][[:digit:]]+)?$"
27+ Windows = " ^tbb.*\\ .dll$" ,
28+ Darwin = " ^libtbb.*\\ .dylib$" ,
29+ Linux = " ^libtbb.*\\ .so.*$" ,
30+ " ^libtbb.*\\ .so.*$"
3031 )
3132
3233 if (is.na(tbbLib )) {
3839 full.names = TRUE
3940 )
4041
41- # only copy real files; don't copy symlinks
42- links <- Sys.readlink(tbbLibs )
43- file.copy(tbbLibs [! nzchar(links )], tbbDest )
42+ # don't copy symlinks
43+ tbbLibs <- tbbLibs [! nzchar(Sys.readlink(tbbLibs ))]
44+
45+ # perform the copy
46+ file.copy(tbbLibs , tbbDest )
4447
4548 } else {
4649
5154 full.names = TRUE
5255 )
5356
54- # symlink tbb libraries
55- file.symlink(tbbLibs , tbbDest )
57+ # don't copy symlinks
58+ tbbLibs <- tbbLibs [! nzchar(Sys.readlink(tbbLibs ))]
59+
60+ # copy / link the libraries
61+ useSymlinks <- Sys.getenv(" TBB_USE_SYMLINKS" , unset = " TRUE" )
62+ if (useSymlinks )
63+ file.symlink(tbbLibs , tbbDest )
64+ else
65+ file.copy(tbbLibs , tbbDest )
5666
5767 }
5868
You can’t perform that action at this time.
0 commit comments