Skip to content

Commit 6fc5c38

Browse files
committed
Update CXXFLAGS
See stan-dev/math#2257.
1 parent c5982ca commit 6fc5c38

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

R/build.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ tbbCxxFlags <- function() {
5050

5151
if (dir.exists(Sys.getenv("TBB_INC"))) {
5252
TBB_INC <- asBuildPath(Sys.getenv("TBB_INC"))
53-
flags <- paste0("-I", shQuote(TBB_INC))
53+
54+
if (file.exists(file.path(TBB_INC, "tbb", "version.h")))
55+
flags <- paste0("-I", shQuote(TBB_INC), " -DTBB_INTERFACE_NEW")
56+
} else {
57+
flags <- paste0("-I", shQuote(TBB_INC))
58+
}
5459
}
5560

5661
flags

0 commit comments

Comments
 (0)