File tree 3 files changed +15
-0
lines changed
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ tesseract_LDADD = libtesseract.la
81
81
if USE_OPENCL
82
82
tesseract_LDADD += $(OPENCL_LIB )
83
83
endif
84
+ if OPENMP
85
+ tesseract_LDADD += $(OPENMP_CFLAGS )
86
+ endif
84
87
85
88
if T_WIN
86
89
tesseract_LDADD += -lws2_32
Original file line number Diff line number Diff line change 18
18
// /////////////////////////////////////////////////////////////////////
19
19
20
20
#include " tesseractclass.h"
21
+ #ifdef OPENMP
22
+ #include < omp.h>
23
+ #endif // OPENMP
21
24
22
25
namespace tesseract {
23
26
Original file line number Diff line number Diff line change @@ -166,6 +166,15 @@ if test "$enable_embedded" = "yes"; then
166
166
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
167
167
fi
168
168
169
+ # check whether to build OpenMP support
170
+ AC_OPENMP
171
+ AS_IF([test "x$OPENMP_CFLAGS" != "x"],
172
+ AM_CONDITIONAL([OPENMP], test "x$OPENMP_CFLAGS" != "x")
173
+ AC_SUBST(AM_CPPFLAGS,"$OPENMP_CXXFLAGS")
174
+ AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])
175
+ )
176
+
177
+
169
178
# check whether to build opencl version
170
179
AC_MSG_CHECKING(--enable-opencl argument)
171
180
AC_ARG_ENABLE([opencl],
You can’t perform that action at this time.
0 commit comments