intel -tbb 源码cmake构建
Posted 周旭光
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了intel -tbb 源码cmake构建相关的知识,希望对你有一定的参考价值。
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
project(tbb CXX)
add_library(tbb SHARED void.cpp)
set(CMAKE_BUILD_TYPE "Release")
include($TBB_ROOT/cmake/TBBBuild.cmake)
# Build Intel TBB with enabled Community Preview Features (CPF).
tbb_build(TBB_ROOT $TBB_ROOT CONFIG_DIR TBB_DIR)
find_package(TBB REQUIRED tbb)
# Link Intel TBB imported targets to the executable;
# "TBB::tbb" can be used instead of "$TBB_IMPORTED_TARGETS".
target_link_libraries(tbb $TBB_IMPORTED_TARGETS)
cmake -DTBB_ROOT=tbb根目录 ../
make
android上还没找到编译出so的方法,mac和ios已经编译成功
以上是关于intel -tbb 源码cmake构建的主要内容,如果未能解决你的问题,请参考以下文章
加速图像处理的神器: INTEL ISPC编译器基于CMAKE快速创建VISUAL STUDIO项目