Fixes #76 - enable OpenMP support

This commit is contained in:
Zdenko Podobný 2015-08-14 21:35:18 +02:00
parent ae6f195b1f
commit bb19f2c16b
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -18,6 +18,9 @@
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include "tesseractclass.h" #include "tesseractclass.h"
#ifdef OPENMP
#include <omp.h>
#endif // OPENMP
namespace tesseract { namespace tesseract {

View File

@ -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],