[cmake-developers] Review request: FindTBB module

Andreas Schuh andreas.schuh.84 at gmail.com
Thu Mar 31 05:48:43 EDT 2016


Hi all,

I also came across these FindTBB modules while in need for one. As the more recent one from the OGRE project did not support MSVS 2015 yet, and also does not create import targets for a more convenient and “modern” CMake use of the TBB library targets, I wrote my own module.

Features:
- Makes use of COMPONENTS argument of find_package to look for the different TBB libraries.
- Adds IMPORTED library targets with IMPORTED_* and INTERFACE_* properties set appropriately.
- Considers TBB_ROOT as user hint and bases library search on root derived from TBB_INCLUDE_DIR otherwise.
- Uses PATH_SUFFIXES instead of full search paths as done by OGRE FindTBB module to take advantage of CMake’s default search paths.
- Checks TBB_VERSION against VERSION argument of find_package using find_package_handle_standard_args.

This module is part of my CMake BASIS project which, among other things, consists of custom CMake functions and modules which attempt to standardise and reduce the CMake code needed by most projects (in research). These CMake BASIS Modules can be found on GitHub: https://github.com/schuhschuh/cmake-basis-modules.

Would be great if someone could review the FindTBB module at
	
	https://github.com/schuhschuh/cmake-basis-modules/blob/develop/FindTBB.cmake

and provide some feedback about what needs to be modified before it can be added to the official CMake Modules.

Best,
Andreas

> On 12 Mar 2015, at 00:04, Klaim - Joël Lamotte <mjklaim at gmail.com> wrote:
> 
> 
> ​Hi,
> 
> did you manage to improve over the DaxToolkit FindTBB module?
> 
> Thanks for your time.
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers



More information about the cmake-developers mailing list