Intel Threading Building Blocks CMake |
TBB_FOUND |
Intel TBB |
TBB_ |
|
TBB_IMPORTED_TARGETS |
|
TBB_VERSION |
Intel TBB (: |
TBB_INTERFACE_VERSION |
Intel TBB |
TBB_ROOT |
, |
CONFIG_DIR |
, ; |
MAKE_ARGS |
make-; , :
|
include(/TBBBuild.cmake)
tbb_build(TBB_ROOT CONFIG_DIR TBB_DIR)
find_package(TBB )
TBB_ROOT |
, ; |
RELEASE_TAG |LATEST |
; LATEST |
SAVE_TO |
; ${CMAKE_CURRENT_BINARY_DIR}/tbb_downloaded |
SYSTEM_NAME Linux|Windows|Darwin |
, ; CMAKE_SYSTEM_NAME |
CONFIG_DIR |
, ; , SOURCE_CODE |
SOURCE_CODE |
, |
include(/TBBGet.cmake)
tbb_get(TBB_ROOT tbb_root CONFIG_DIR TBB_DIR)
find_package(TBB )
include(/TBBGet.cmake)
include(/TBBBuild.cmake)
tbb_get(TBB_ROOT tbb_root SOURCE_CODE)
tbb_build(TBB_ROOT ${tbb_root} CONFIG_DIR TBB_DIR)
find_package(TBB )
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
project(sub_string_finder CXX)
add_executable(sub_string_finder sub_string_finder.cpp)
# find_package TBBConfig,
# CMAKE_PREFIX_PATH TBB_DIR.
find_package(TBB REQUIRED tbb)
# "TBB::tbb" "${TBB_IMPORTED_TARGETS}"
target_link_libraries(sub_string_finder ${TBB_IMPORTED_TARGETS})
mkdir ~/demo_tbb_cmake
cd ~/demo_tbb_cmake
git clone https://github.com/01org/tbb.git
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
project(sub_string_finder CXX)
add_executable(sub_string_finder sub_string_finder.cpp)
include(${TBB_ROOT}/cmake/TBBBuild.cmake)
# Intel TBB Community Preview Features (CPF).
tbb_build(TBB_ROOT ${TBB_ROOT} CONFIG_DIR TBB_DIR MAKE_ARGS tbb_cpf=1)
find_package(TBB REQUIRED tbb_preview)
# "TBB::tbb_preview" "${TBB_IMPORTED_TARGETS}".
target_link_libraries(sub_string_finder ${TBB_IMPORTED_TARGETS})
mkdir ~/demo_tbb_cmake/tbb/examples/GettingStarted/sub_string_finder/build
cd ~/demo_tbb_cmake/tbb/examples/GettingStarted/sub_string_finder/build
cmake -DTBB_ROOT=${HOME}/demo_tbb_cmake/tbb ..
make
./sub_string_finder