我正在尝试按照说明(此处为https://pytorch.org/cppdocs/installing.html)在OSX上安装LibTorch。直到“ make”命令返回
为止,我一切都很好Scanning dependencies of target example-app
[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/example-app.dir/example-app.cpp.o] Error 1
make[1]: *** [CMakeFiles/example-app.dir/all] Error 2
make: *** [all] Error 2
有什么想法可以解决此问题吗?
顺便说一下,在前面的cmake步骤中,似乎Cmake找到的编译器是Mac上的默认系统编译器:
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works