Skip to content

Commit

Permalink
Fixes #76 - enable OpenMP support
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Aug 14, 2015
1 parent ae6f195 commit bb19f2c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ccmain/par_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
///////////////////////////////////////////////////////////////////////

#include "tesseractclass.h"
#ifdef OPENMP
#include <omp.h>
#endif // OPENMP

namespace tesseract {

Expand Down
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit bb19f2c

Please sign in to comment.