Skip to content

Commit ab28df7

Browse files
committed
Fix OpenMP builds on Unix
1 parent 4348793 commit ab28df7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ endif()
120120

121121
if (OPENMP_BUILD)
122122
if (CLANG)
123-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fopenmp")
123+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
124124
else(MSVC)
125125
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
126126
endif()
@@ -427,6 +427,10 @@ if (HAVE_TIFFIO_H)
427427
target_link_libraries(tesseract tiff)
428428
endif()
429429

430+
if (OPENMP_BUILD AND UNIX)
431+
target_link_libraries (tesseract pthread)
432+
endif()
433+
430434
########################################
431435

432436
if (BUILD_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/googletest/CMakeLists.txt)

0 commit comments

Comments
 (0)