mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Fixes #76 - enable OpenMP support
This commit is contained in:
parent
ae6f195b1f
commit
bb19f2c16b
@ -81,6 +81,9 @@ tesseract_LDADD = libtesseract.la
|
||||
if USE_OPENCL
|
||||
tesseract_LDADD += $(OPENCL_LIB)
|
||||
endif
|
||||
if OPENMP
|
||||
tesseract_LDADD += $(OPENMP_CFLAGS)
|
||||
endif
|
||||
|
||||
if T_WIN
|
||||
tesseract_LDADD += -lws2_32
|
||||
|
@ -18,6 +18,9 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tesseractclass.h"
|
||||
#ifdef OPENMP
|
||||
#include <omp.h>
|
||||
#endif // OPENMP
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
|
@ -166,6 +166,15 @@ if test "$enable_embedded" = "yes"; then
|
||||
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
|
||||
fi
|
||||
|
||||
# check whether to build OpenMP support
|
||||
AC_OPENMP
|
||||
AS_IF([test "x$OPENMP_CFLAGS" != "x"],
|
||||
AM_CONDITIONAL([OPENMP], test "x$OPENMP_CFLAGS" != "x")
|
||||
AC_SUBST(AM_CPPFLAGS,"$OPENMP_CXXFLAGS")
|
||||
AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])
|
||||
)
|
||||
|
||||
|
||||
# check whether to build opencl version
|
||||
AC_MSG_CHECKING(--enable-opencl argument)
|
||||
AC_ARG_ENABLE([opencl],
|
||||
|
Loading…
Reference in New Issue
Block a user