Which versions of TBB libraries required
Since 2017 TBB ships with its own CMake config file. Additionally, we provide in dune-common a
FindTBB module. It should be preferred to use a config file, because it is created by those people also created the code it configures. Is the current FindTBB module kind of just a fall-back solution in case the config file is not provided?
Which versions of TBB are actually required and used? In debian 10 the libtbb-dev does not provide a cmake config file, but instead a PkgConfig file that could easily be incorporated into cmake. In debian 11 there is a cmake config file provided. Same for ubuntu. Some version with pkgconfig files, others with the cmake config files. In neither case, a FindModule is required.
Are there other systems that need to be considered here that neither provide a pkg-config nor the cmake config file and have older TBB than 2017? If a newer TBB than 2017 is installed in a system, one could easily generate the corresponding cmake config for this. TBB provides scripts to generate this.
I would suggest to drop the current FindTBB file, or replace it with a small wrapper around pkg-config. This would be much cleaner and much better readable and maintainable.