FindTBB¶
Find the TBB include directories and libraries.
Use this module by invoking find_package with the form:
find_package(TBB
[version] [EXACT] # Minimum or EXACT version, e.g 2017.7
[REQUIRED] # Fail with error if TBB is not found
[COMPONENTS <libs>...] # Additional TBB libraries by their
) # name, e.g. "tbbmalloc" for "libtbbmalloc"
Supported arguments to COMPONENTS
are tbbmalloc
, tbbmalloc_proxy
and tbb_preview
.
Imported Targets¶
This module defines the following IMPORTED
target if
TBB has been found:
TBB::tbb - Target for main TBB library.
TBB::<C> - Target for TBB component ``<C>`` library, if requested in
``COMPONENTS`` argument.
Valid arguments to COMPONENTS
are tbbmalloc
, tbbmalloc_proxy
and tbb_preview
.
Result Variables¶
This module will set the following variables in your project:
TBB_FOUND - True if TBB found.
TBB_INCLUDE_DIRS - The include directory for TBB headers.
TBB_LIBRARIES - The libraries to link against to use TBB.
TBB_LIBRARIES_RELEASE - The release libraries to link against to use TBB.
TBB_LIBRARIES_DEBUG - The debug libraries to link against to use TBB.
TBB.
TBB_DEFINITIONS - Definitions to use when compiling code that uses
TBB
TBB_DEFINITIONS_RELEASE - Definitions to use when compiling code that uses
the TBB release library.
TBB_DEFINITIONS_DEBUG - Definitions to use when compiling code that uses
the TBB debug library.
TBB_VERSION - The full version string of the found TBB.
TBB_VERSION_MAJOR - The major version
TBB_VERSION_MINOR - The minor version
TBB_INTERFACE_VERSION - The interface version number defined in
tbb/tbb_stddef.h.
TBB_<C>_FOUND - True if optional component <C> of TBB is found.
TBB_<C>_LIBRARY_RELEASE - The release library for component <C> TBB library.
TBB_<C>_LIBRARY_DEBUG - The debug library for component <C> TBB library.
Valid values for <C>
are as described above for the Imported Targets.
Hints¶
A user may set the the CMake variable TBB_ROOT_DIR
to a TBB installation
root to tell this module where to look.
A user may set the environment variables TBB_INSTALL_DIR
or TBBROOT
to a TBB installation root to tell this module where to look.
If a combination of these variables are set, they are used in the order
of preference TBB_ROOT_DIR
, then TBB_INSTALL_DIR
, then TBBROOT
.