We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7ee864 commit 4180fadCopy full SHA for 4180fad
1 file changed
R/build.R
@@ -2,20 +2,24 @@
2
3
4
inlineCxxPlugin <- function() {
5
- tbb <- tbbLibPath()
6
- if (!is.null(tbb)) {
+
+ # For sourceCpp on Windows we need to explicitly link against tbb.dll
7
+ if (Sys.info()['sysname'] == "Windows") {
8
+ tbb <- tbbLibPath()
9
pkgLibs <- paste("-L", asBuildPath(dirname(tbb)),
10
" -ltbb", sep="")
- list(
- env = list(PKG_LIBS = pkgLibs),
11
- includes = "#include <RcppParallel.h>",
12
- LinkingTo = "RcppParallel",
13
- body = function( x ) x,
14
- Depends = "RcppParallel"
15
- )
+ env <- list(PKG_LIBS = pkgLibs)
16
} else {
17
- NULL
+ env <- list()
18
}
+ list(
+ env = env,
+ includes = "#include <RcppParallel.h>",
19
+ LinkingTo = "RcppParallel",
20
+ body = function( x ) x,
21
+ Depends = "RcppParallel"
22
+ )
23
24
25
0 commit comments