File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ ifdef TBB_ROOT
1414
1515endif
1616
17- # If TBB_LIB is defined by TBB_INC is not, make a guess.
17+ # If TBB_LIB is not defined, try to use autodetection
18+ ifndef TBB_LIB
19+ TBB_LIB = @TBB_LIB_AUTO@
20+ TBB_INC = @TBB_INC_AUTO@
21+ endif
22+
23+ # If TBB_LIB is defined but TBB_INC is not, make a guess.
1824ifdef TBB_LIB
1925 ifndef TBB_INC
2026 TBB_INC = $(TBB_LIB)/../include
Original file line number Diff line number Diff line change @@ -126,3 +126,23 @@ if (Sys.info()[["sysname"]] == "SunOS") {
126126 }
127127}
128128
129+ # tbb autodetection on Unix
130+ define(TBB_LIB_AUTO = " " , TBB_INC_AUTO = " " )
131+ if (.Platform $ OS.type == " unix" ) {
132+ tbbLib <- Sys.glob(c(
133+ " /usr/*/libtbb.so" ,
134+ " /usr/*/*/libtbb.so" ,
135+ " /usr/*/*/*/libtbb.so"
136+ ))
137+ tbbInc <- Sys.glob(c(
138+ " /usr/include/tbb.h" ,
139+ " /usr/include/*/tbb.h"
140+ ))
141+ if (length(tbbLib ) && length(tbbInc )) {
142+ define(
143+ TBB_LIB_AUTO = dirname(tbbLib [1 ]),
144+ TBB_INC_AUTO = dirname(tbbInc [1 ])
145+ )
146+ }
147+ }
148+
You can’t perform that action at this time.
0 commit comments