Skip to content

Commit fe061d2

Browse files
committed
fix compilation when libtbb installed in /usr/local/include
1 parent f0c66e9 commit fe061d2

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: RcppParallel
22
Type: Package
33
Title: Parallel Programming Tools for 'Rcpp'
4-
Version: 5.0.0
4+
Version: 5.0.0-9000
55
Authors@R: c(
66
person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"),
77
person("Romain", "Francois", role = c("aut", "cph")),

inst/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
RcppParallel 5.0.1 (UNRELEASED)
2+
------------------------------------------------------------------------
3+
* Fixed compilation when CPPFLAGS = -I/usr/local/include and a version
4+
of libtbb is installed there
5+
16
RcppParallel 5.0.0
27
------------------------------------------------------------------------
38
* RcppParallel backend can now be customized with RCPP_PARALLEL_BACKEND

tools/config/configure.R

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,20 @@ broken <-
2121
if (broken)
2222
cxxflags <- gsub("-Werror=format-security", "-Wformat -Werror=format-security", cxxflags)
2323

24+
# avoid including /usr/local/include, as this can cause
25+
# RcppParallel to find and use a version of libtbb installed
26+
# there as opposed to the bundled version
27+
cppflags <- read_r_config("CPPFLAGS", envir = NULL)[[1]]
28+
cppflags <- sub("(?: )?-I/usr/local/include", "", cppflags)
29+
2430
# define the set of flags appropriate to the current
2531
# configuration of R
2632
switch(
2733
cxx,
2834

2935
CXX11 = define(
3036
CC = "$(CC)",
31-
CPPFLAGS = "$(CPPFLAGS)",
37+
CPPFLAGS = cppflags,
3238
CXX11 = "$(CXX11)",
3339
CXX11FLAGS = cxxflags,
3440
CXX11STD = "$(CXX11STD)",
@@ -37,7 +43,7 @@ switch(
3743

3844
CXX1X = define(
3945
CC = "$(CC)",
40-
CPPFLAGS = "$(CPPFLAGS)",
46+
CPPFLAGS = cppflags,
4147
CXX11 = "$(CXX1X)",
4248
CXX11FLAGS = cxxflags,
4349
CXX11STD = "$(CXX1XSTD)",
@@ -46,7 +52,7 @@ switch(
4652

4753
CXX = define(
4854
CC = "$(CC)",
49-
CPPFLAGS = "$(CPPFLAGS)",
55+
CPPFLAGS = cppflags,
5056
CXX11 = "$(CXX)",
5157
CXX11FLAGS = cxxflags,
5258
CXX11STD = "-std=c++0x",

0 commit comments

Comments
 (0)