diff --git a/CMakeLists.txt b/CMakeLists.txt index bb9e8545..12559bb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)