Skip to content

cmake: workaround oneTBB build issues with MSVC#19447

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:cmake_tbb_workaround_msvc
Feb 2, 2021
Merged

cmake: workaround oneTBB build issues with MSVC#19447
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:cmake_tbb_workaround_msvc

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Feb 2, 2021

continues #19384

Workarounds TBB problem on Windows:

LINK : fatal error LNK1104: cannot open file 'tbb12.lib'

Caused by this oneTBB code.

Usage steps:

call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
cmake -G "Visual Studio 16 2019" -A x64 ../opencv -DCMAKE_BUILD_TYPE=Release -DWITH_TBB=ON

Validated:

  • CMake:
-- Found TBB (env): C:/Program Files (x86)/Intel/oneAPI/tbb/latest/lib/intel64/vc_mt/tbb.lib
...
--   Parallel framework:            TBB (ver 2021.1 interface 12010)
  • and test output:
Parallel framework: tbb (nthreads=8)

P.S. oneMKL with oneTBB requires dirty workaround to enable build on Windows (not in scope of this patch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants