Fancier TBB (Threaded Building Blocks) detection.

Update documentation to mention that it's needed.
This commit is contained in:
Jim Blandy 2020-07-29 16:14:51 -07:00
parent 2682ae1af0
commit a12bf2d753

View File

@ -25,8 +25,14 @@ else
LIBS += $(shell pkg-config --libs gtk+-2.0) -lGL
endif
TBB := $(shell ld -ltbb -o /dev/null 2>/dev/null; echo $$?)
ifeq ($(TBB),0)
# Tracy does not use TBB directly, but the implementation of parallel algorithms
# in some versions of libstdc++ depends on TBB. When it does, you must
# explicitly link against -ltbb.
#
# Some distributions have pgk-config files for TBB, others don't.
ifeq (0,$(shell pkg-config --libs tbb >/dev/null 2>&1; echo $$?))
LIBS += $(shell pkg-config --libs tbb)
else ifeq (0,$(shell ld -ltbb -o /dev/null 2>/dev/null; echo $$?))
LIBS += -ltbb
endif