Skip to content

Commit

Permalink
Merge pull request tesseract-ocr#2477 from ismail/master
Browse files Browse the repository at this point in the history
Fix OpenMP builds on Unix
  • Loading branch information
zdenop authored May 31, 2019
2 parents 4348793 + ab28df7 commit 359f3c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 359f3c5

Please sign in to comment.