Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Trouble Building TBB in windows with CMake

Aiyer__Kartik
Beginner
972 Views

Hi, 

 

I'm trying to use TBB by building from source in my project. I'm doing this on a Windows 10 system and am using the MSVC toolchain that comes with Visual Studio 2019 Community edition. I"m using the standard approach of `git submodule add` and pointing it to TBB github source to get the code. I then followed the following steps in my main CMakeLists.txt.  

# TBB
include(tbb/cmake/TBBBuild.cmake)
tbb_build(TBB_ROOT ${PROJECT_SOURCE_DIR}/tbb/ CONFIG_DIR TBB_DIR MAKE_ARGS tbb_cpf=1)

 

When I run the cmake configuration step I get the following error.

"C:\Program Files\JetBrains\CLion 2019.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - NMake Makefiles" C:\Users\kartik\Projects\cv\hello_cv
-- The C compiler identification is MSVC 19.24.28316.0
-- The CXX compiler identification is MSVC 19.24.28316.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Intel TBB can not be built: required make-tool (gmake) was not found
TBB Dir = TBB_DIR-NOTFOUND

 

Is the gmake referred to here GNU Make ? If so why is there a dependency on GNU Make when I'm using the MSVC toolchain? In this case I'm using my IDE (CLion which generates NMake files for windows by default) however I can reproduce the problem running cmake in a power shell terminal.

 

 

PS C:\Users\kartik\Projects\cv\hello_cv\build-out> cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" ..
-- The C compiler identification is MSVC 19.24.28316.0
-- The CXX compiler identification is MSVC 19.24.28316.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Intel TBB can not be built: required make-tool (gmake) was not found
TBB Dir = TBB_DIR-NOTFOUND

 

Is there a way I can work around this ? I have a MinGW toolchain which should have the GCC tools, however, when I use that toolchain I get the same error as well. Any help would be appreciated.

 

Thanks

0 Kudos
2 Replies
Vladimir_P_Intel2
972 Views

is gnu make tool called gmake in your mingw package? it looks you need gmake available in %PATH% when you run cmake.

Vladimir 

James_T_Intel
Moderator
972 Views

I'm closing this thread due to no activity.

Reply