Skip to content

Commit

Permalink
Added googlemock building instructions
Browse files Browse the repository at this point in the history
The googlemock tools are already present, so why not make use of
it. It can be usefull for testing callbacks.
  • Loading branch information
Jaroslaw Kubik committed Jun 1, 2018
1 parent e6c9967 commit 92168c5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions unittest/Makefile.am
Expand Up @@ -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 \
Expand Down

0 comments on commit 92168c5

Please sign in to comment.