tbb_build是否可以在Windows上使用MSVC?

时间:2017-06-13 18:19:17

标签: c++ cmake tbb

我已经快速尝试了" sub_string_finder"使用CMake,Visual Studio 2015,Windows和https://github.com/01org/tbb的示例(我安装了Strawberry Perl。)

我正在尝试使用TBBBuild.cmake 来自this Github repository from intel的另一个项目。 (所以我克隆了存储库,并尝试运行CMake)

我的CMakeLists.txt很简单,看起来像

cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
project(sub_string_finder CXX)

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 MAKE_ARGS tbb_cpf=1)

#add_executable(sub_string_finder sub_string_finder.cpp)
find_package(TBB REQUIRED tbb_preview)
#target_link_libraries(sub_string_finder ${TBB_IMPORTED_TARGETS})

(注意我甚至没有做任何想要添加可执行文件来测试TBB的东西,只是尝试在CMake中configure / generate一个项目。这个应该为我构建TBB库,所以我可以稍后链接它们,以及我在这里尝试的所有内容。)

这是我得到的错误:

Building Intel TBB: C:/Strawberry/c/bin/gmake.exe -j16 tbb_build_prefix=tbb_cmake_build_subdir tbb_build_dir=C:/Users/ME/Desktop/TESTTBB/tbb/examples/GettingStarted/sub_string_finder/build/tbb_cmake_build compiler=cl tbb_cpf=1
Building is unsuccessful (2): C:/Users/ME/Desktop/TESTTBB/tbb/./build/Makefile.tbb:32: CONFIG: cfg=debug arch=unknown compiler=cl target=windows runtime=unknown
process_begin: CreateProcess(NULL, cl /nologo /Foconcurrent_hash_map.obj /c /MDd /Od /Ob0 /Zi /EHsc /GR /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D__TBB_LIB_NAME=tbb_preview_debug.lib /DDO_ITT_NOTIFY /GS /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0502 /D__TBB_BUILD=1 /W4 /D__TBB_CPF_BUILD=1 /IC:/Users/ME/Desktop/TESTTBB/tbb/./src /IC:/Users/ME/Desktop/TESTTBB/tbb/./src/rml/include /IC:/Users/ME/Desktop/TESTTBB/tbb/./include C:/Users/ME/Desktop/TESTTBB/tbb/./src/tbb/concurrent_hash_map.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
gmake.exe[1]: *** [C:/Users/ME/Desktop/TESTTBB/tbb/./build/common_rules.inc:76: concurrent_hash_map.obj] Error 2
gmake.exe: *** [Makefile:32: tbb] Error 2

所以它没有超越

tbb_build(TBB_ROOT ${TBB_ROOT} CONFIG_DIR TBB_DIR MAKE_ARGS tbb_cpf=1)

CMakeLists文件的行。 在TBBBuild内部,看起来是Windows的挂钩,MSVC,但仍然有这个基本示例的问题。

我用基本命令调用命令     cmake -DTBB_ROOT = c:/ libraries / tbb (我克隆了TBB)

0 个答案:

没有答案