mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 02:59:07 +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
|
if USE_OPENCL
|
||||||
tesseract_LDADD += $(OPENCL_LIB)
|
tesseract_LDADD += $(OPENCL_LIB)
|
||||||
endif
|
endif
|
||||||
|
if OPENMP
|
||||||
|
tesseract_LDADD += $(OPENMP_CFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
if T_WIN
|
if T_WIN
|
||||||
tesseract_LDADD += -lws2_32
|
tesseract_LDADD += -lws2_32
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "tesseractclass.h"
|
#include "tesseractclass.h"
|
||||||
|
#ifdef OPENMP
|
||||||
|
#include <omp.h>
|
||||||
|
#endif // OPENMP
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
|
@ -166,6 +166,15 @@ if test "$enable_embedded" = "yes"; then
|
|||||||
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
|
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
|
||||||
fi
|
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
|
# check whether to build opencl version
|
||||||
AC_MSG_CHECKING(--enable-opencl argument)
|
AC_MSG_CHECKING(--enable-opencl argument)
|
||||||
AC_ARG_ENABLE([opencl],
|
AC_ARG_ENABLE([opencl],
|
||||||
|
Loading…
Reference in New Issue
Block a user