Added googlemock building instructions

The googlemock tools are already present, so why not make use of
it. It can be usefull for testing callbacks.
This commit is contained in:
Jaroslaw Kubik 2018-06-02 00:42:37 +02:00
parent e6c9967b83
commit 92168c5e8b

View File

@ -25,16 +25,30 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/viewer
AM_CPPFLAGS += -I$(top_srcdir)/src/wordrec
# Build googletest:
check_LTLIBRARIES = libgtest.la libgtest_main.la
check_LTLIBRARIES = libgtest.la libgtest_main.la libgmock.la libgmock_main.la
libgtest_la_SOURCES = ../googletest/googletest/src/gtest-all.cc
libgtest_la_CPPFLAGS = -I$(top_srcdir)/googletest/googletest/include -I$(top_srcdir)/googletest/googletest -pthread
libgtest_main_la_SOURCES = ../googletest/googletest/src/gtest_main.cc
## libgtest_main_la_LIBADD = libgtest.la
GMOCK_INCLUDES = -I$(top_srcdir)/googletest/googlemock/include \
-I$(top_srcdir)/googletest/googlemock \
-I$(top_srcdir)/googletest/googletest/include \
-I$(top_srcdir)/googletest/googletest
libgmock_la_SOURCES = ../googletest/googlemock/src/gmock-all.cc
libgmock_la_CPPFLAGS = $(GMOCK_INCLUDES) \
-pthread
libgmock_main_la_SOURCES = ../googletest/googlemock/src/gmock_main.cc
libgmock_main_la_CPPFLAGS = $(GMOCK_INCLUDES) \
-pthread
# Build unittests
GTEST_LIBS = libgtest.la libgtest_main.la
GMOCK_LIBS = libgmock.la libgmock_main.la
TESS_LIBS = $(top_builddir)/src/api/libtesseract.la
AM_CPPFLAGS += -isystem $(top_srcdir)/googletest/googletest/include
AM_CPPFLAGS += -isystem $(top_srcdir)/googletest/googletest/include \
-isystem $(top_srcdir)/googletest/googlemock/include
check_PROGRAMS = \
apiexample_test \