Cmake: some people build shared libtbb - #23089
Conversation
Test Results 16 files 16 suites 2d 13h 3m 50s ⏱️ For more details on these failures, see this check. Results for commit 4887ff4. ♻️ This comment has been updated with latest results. |
|
|
||
| if(TBB_FOUND) | ||
| add_library(TBB::tbb IMPORTED STATIC GLOBAL) | ||
| add_library(TBB::tbb IMPORTED UNKNOWN GLOBAL) |
There was a problem hiding this comment.
Side note: this may (or may not) also be beneficial on Windows (CMake documentation says "[using] UNKOWN ... This is especially useful on Windows where a static library and a DLL's import library both have the same file extension.") (@bellenot )
There was a problem hiding this comment.
We (ROOT) use builtin_tbb but I suppose you're right, if someone use his locally build TBB DLL, this might be useful...
|
@bellenot Could you review this please? |
bellenot
left a comment
There was a problem hiding this comment.
LGTM, once all platforms are green...
This Pull request:
Replaces #23087
Changes or fixes:
It fixes build errors on mac OS 26 with shared library builds of libtbb.
When STATIC is given, the rpath configuration during the linking of libThread is incorrect,
leading to errors later on.
After this change:
Note the rpath setting before libtbb.dylib here
Checklist: