Skip to content

Commit

Permalink
Fix OpenMP builds on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail committed May 31, 2019
1 parent 4348793 commit ab28df7
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 ab28df7

Please sign in to comment.