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 @@ -132,3 +132,23 @@ if (Sys.info()[["sysname"]] == "SunOS") {
132132 }
133133}
134134
135+ # tbb autodetection on Unix
136+ define(TBB_LIB_AUTO = " " , TBB_INC_AUTO = " " )
137+ if (.Platform $ OS.type == " unix" ) {
138+ tbbLib <- Sys.glob(c(
139+ " /usr/*/libtbb.so" ,
140+ " /usr/*/*/libtbb.so" ,
141+ " /usr/*/*/*/libtbb.so"
142+ ))
143+ tbbInc <- Sys.glob(c(
144+ " /usr/include/tbb.h" ,
145+ " /usr/include/*/tbb.h"
146+ ))
147+ if (length(tbbLib ) && length(tbbInc )) {
148+ define(
149+ TBB_LIB_AUTO = dirname(tbbLib [1 ]),
150+ TBB_INC_AUTO = dirname(tbbInc [1 ])
151+ )
152+ }
153+ }
154+
You can’t perform that action at this time.
0 commit comments