Fix OpenMP builds on Unix

This commit is contained in:
İsmail Dönmez 2019-05-31 14:18:26 +02:00
parent 4348793bd5
commit ab28df7448
No known key found for this signature in database
GPG Key ID: BE04133F8FEC6368

View File

@ -120,7 +120,7 @@ endif()
if (OPENMP_BUILD)
if (CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fopenmp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
else(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
endif()
@ -427,6 +427,10 @@ if (HAVE_TIFFIO_H)
target_link_libraries(tesseract tiff)
endif()
if (OPENMP_BUILD AND UNIX)
target_link_libraries (tesseract pthread)
endif()
########################################
if (BUILD_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/googletest/CMakeLists.txt)