Skip to content

Commit 913f619

Browse files
committed
Fix TBB and Clang compiler issue
1 parent b1aaba6 commit 913f619

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/FindTBB.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ if (UNIX)
9898
# has itanium/*
9999
set(_TBB_COMPILER ${TBB_COMPILER})
100100
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
101+
102+
# Fix for clang compiler
103+
# https://www.threadingbuildingblocks.org/docs/help/reference/appendices/known_issues/linux_os.html
104+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
105+
string(REPLACE "." "0" TBB_USE_GLIBCXX_VERSION ${CMAKE_CXX_COMPILER_VERSION})
106+
add_definitions(-DTBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION})
107+
endif()
101108
endif (APPLE)
102109
endif (UNIX)
103110

0 commit comments

Comments
 (0)