Open mqudsi opened 5 years ago
Hi, I think openmp should be fairly standard. I think you can safely add it universally.
Sure, but should the particular openmp library (=libomp
) be hardcoded?
I don't know a better way. Not sure whether the dependencies in the packages have to be updated as well.
I have this issue as well, when using clang > 7.0 you don't need to specify -lgomp
in the CmakeLists.txt change
if(USE_OMP)
add_definitions(-fopenmp -DUSE_OMP)
endif()
to
if(USE_OMP)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(OpenMP::OpenMP_CXX)
endif()
endif()
and this
if(USE_OMP)
target_link_libraries(vidstab gomp)
set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lgomp -lpthread")
endif()
to
if(USE_OMP)
target_link_libraries(vidstab)
set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lpthread")
endif()
I have another way to solve this problem add CFLAGS to -fopenmp
my build environment:
linux mint Linux Mint 19.3
LLVM 9.0.0 Pre-Built Binaries:
ffmpeg's configure script tries to compile the following, which fails:
compiling it myself:
Corrected by modifying
vidstab.pc
to include-fopenmp=libomp
:I'm not familiar enough with OpenMP to determine if this is safe to add universally.