oneTBB
oneTBB copied to clipboard
CMake: Include dependency on Threads in published TBBConfig.cmake
Currently neither TBBConfig.cmake nor TBBTargets.cmake specify dependency on Threads package even though TBBTargets.cmake list Threads::Threads among INTERFACE_LINK_LIBRARIES of TBB::tbb library.
This causes configuration failures in projects that specify dependency on TBB via find_package(TBB), but don't themselves depend on the Threads package.
At the moment there's no other way to fix this except to specify the dependency manually.
Maybe some day this will be handled automatically in CMake. This is the bug that tracks such feature: https://gitlab.kitware.com/cmake/cmake/-/issues/20511.
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
- [x] bug fix - change that fixes an issue
- [ ] new feature - change that adds functionality
- [ ] tests - change in tests
- [ ] infrastructure - change in infrastructure and CI
- [ ] documentation - documentation update
Tests
- [ ] added - required for new features and some bug fixes
- [x] not needed
Documentation
- [ ] updated in # - add PR number
- [ ] needs to be updated
- [x] not needed
Breaks backward compatibility
- [ ] Yes
- [x] No
- [ ] Unknown