Code Monkey home page Code Monkey logo

findtbb's Introduction

FindTBB Module

FindTBB is a CMake find package module for Intel® Threading Building Blocks (TBB).

Usage

The signature of the TBB find module in CMake is:

find_package(TBB [major[.minor]] [EXACT] [QUIET] [REQUIRED]
             [COMPONENTS [tbbmalloc] [tbbmalloc_proxy] [tbb_preview]]
             [OPTIONAL_COMPONENTS [tbbmalloc] [tbbmalloc_proxy] [tbb_preview]]) 

where the allowed components are tbbmalloc and tbb_preview.

Example Project

With CMake 3.0 and later

cmake_minimum_required(VERSION 3.0)
project(MyProject)

list(APPEND CMAKE_MODULE_PATH "<path to FindTBB module>")

find_package(TBB COMPONENTS tbbmalloc tbbmalloc_proxy tbb_preview)

add_executable(myapp myapp.cc)
target_link_libraries(myapp tbb)

With CMake 2.8 and earlier

cmake_minimum_required(VERSION 2.8)
project(MyProject)

list(APPEND CMAKE_MODULE_PATH "<path to FindTBB module>")

find_package(TBB COMPONENTS tbbmalloc tbbmalloc_proxy tbb_preview)

add_executable(myapp myapp)
target_include_directories(myapp PRIVATE ${TBB_INCLUDE_DIRS})
target_compile_definitions(myapp PRIVATE ${TBB_DEFINITIONS})
target_link_libraries(myapp ${TBB_LIBRARIES})

User Variables

The following varibiles may be used by the user to specify the install, include, and/or library directories of TBB.

  • TBB_ROOT_DIR - The base directory the of TBB installation.
  • TBB_INCLUDE_DIR - The directory that contains the TBB headers files.
  • TBB_LIBRARY - The directory that contains the TBB library files.
  • TBB_<library>_LIBRARY - The path of the corresponding TBB library. These libraries, if specified, override the corresponding library search results, where may be tbb, tbb_debug, tbbmalloc, tbbmalloc_debug, tbb_preview, or tbb_preview_debug.
  • TBB_USE_DEBUG_BUILD - The debug version of tbb libraries, if present, will be used instead of the release version.

In addition, FindTBB uses the following environment variables to find the TBB install directory.

  • TBB_INSTALL_DIR
  • TBBROOT
  • LIBRARY_PATH

FindTBB Results

This module will set the following variables:

  • TBB_FOUND - Set to false, or undefined, if we haven’t found, or don’t want to use TBB.
  • TBB_<component>_FOUND - If False, optional part of TBB sytem is not available.
  • TBB_VERSION - The full version string
  • 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_<library>_LIBRARY_RELEASE - The path of the TBB release version of , where may be tbb, tbb_debug, tbbmalloc, tbbmalloc_proxy, or tbb_preview.
  • TBB_<library>_LIBRARY_DEGUG - The path of the TBB release version of , where may be tbb_debug, tbbmalloc_debug, tbbmalloc_proxy_debug, or tbb_preview_debug.

Output Variables

The following varibles should be used to link executables and libraries with TBB:

  • TBB_INCLUDE_DIRS - The include directory for TBB.
  • 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_DEFINITIONS - Definitions to use when compiling code that uses TBB.
  • TBB_DEFINITIONS_RELEASE - Definitions to use when compiling release code that uses TBB.
  • TBB_DEFINITIONS_DEBUG - Definitions to use when compiling debug code that uses TBB.

findtbb's People

Contributors

justusc avatar pwm1234-sri avatar benjaminw3 avatar

Watchers

James Cloos avatar WINe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.