Use CMake to find TBB
It is necessary to handle linking of Thread Building Blocks (TBB) to use many of the parallel components of the STL. This can lead to a very large number of OMP loops being replaced by, e.g., std::transform and std::copy. All the compilers we support for release 2023 will also have support for TBB, but linking sadly does not happen by default. Handling this linking at CMake time should be as simple as find_package(TBB)
, potentially with a few extra steps in some cases.
This issue is meant as a starting place for discussion about the pros and cons (if any) of including TBB so that parallel STL algorithms can be used.