Skip to content

Commit 26f4dbf

Browse files
committed
link libatomic on Linux
1 parent fc6cf9e commit 26f4dbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

R/inline.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
inlineCxxPlugin <- function(...) {
2+
settings <- Rcpp::Rcpp.plugin.maker(
3+
include.before = "#include <RcppThread.h>",
4+
package = "RcppThread",
5+
libs = if (Sys.info()["sysname"] == "Linux") "-latomic" else ""
6+
)()
7+
settings$env$USE_CXX11 <- "yes"
8+
settings
9+
}
10+

0 commit comments

Comments
 (0)