gtest: integrate as git submodule
This commit is contained in:
parent
811d3046e1
commit
93351266ee
4 changed files with 16 additions and 20 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "gtest"]
|
||||
path = gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
17
Makefile.am
17
Makefile.am
|
|
@ -35,8 +35,12 @@ noinst_HEADERS += \
|
|||
compiler/c++.capnp.h \
|
||||
compiler/test.capnp.h
|
||||
|
||||
if GTEST
|
||||
AM_CXXFLAGS = -std=gnu++11
|
||||
GTEST_LDADD = gtest/googletest/lib/libgtest.la
|
||||
gtest/googletest/lib/libgtest.la:
|
||||
make -C gtest/googletest lib/libgtest.la
|
||||
GTEST_CPPFLAGS = -I${srcdir}/gtest/googletest/include
|
||||
DIST_SUBDIRS = gtest/googletest
|
||||
|
||||
check_PROGRAMS += \
|
||||
capn-test
|
||||
capn_test_SOURCES = \
|
||||
|
|
@ -45,7 +49,8 @@ capn_test_SOURCES = \
|
|||
compiler/test.capnp.c \
|
||||
compiler/schema-test.cpp \
|
||||
compiler/schema.capnp.c
|
||||
capn_test_CFLAGS = $(GTEST_CFLAGS)
|
||||
capn_test_LDADD = libcapnp_c.la $(GTEST_LDFLAGS)
|
||||
TESTS = capn-test
|
||||
endif
|
||||
capn_test_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_CPPFLAGS)
|
||||
capn_test_CXXFLAGS = -std=gnu++11 -pthread
|
||||
capn_test_LDADD = libcapnp_c.la $(GTEST_LDADD)
|
||||
capn_test_LDFLAGS = -pthread
|
||||
TESTS = capn-test
|
||||
|
|
|
|||
15
configure.ac
15
configure.ac
|
|
@ -35,20 +35,7 @@ AC_SUBST(WERROR)
|
|||
# AC_MSG_ERROR([capnproto base package (0.5.2 or newer) not found])
|
||||
#])
|
||||
|
||||
AC_ARG_WITH(gtest,
|
||||
AS_HELP_STRING([--without-gtest], [disable unit tests using gtest]))
|
||||
if test "x$with_gtest" != "xno" ; then
|
||||
AC_PATH_TOOL([GTEST_CONFIG], [gtest-config], [no])
|
||||
if test x"$GTEST_CONFIG" = x"no"; then
|
||||
AC_MSG_ERROR([gtest installation not found])
|
||||
fi
|
||||
GTEST_LDFLAGS="`${GTEST_CONFIG} --ldflags --libs`"
|
||||
GTEST_CFLAGS="`${GTEST_CONFIG} --cppflags --cxxflags`"
|
||||
gtest=yes
|
||||
fi
|
||||
AC_SUBST(GTEST_LDFLAGS)
|
||||
AC_SUBST(GTEST_CFLAGS)
|
||||
AM_CONDITIONAL([GTEST], [test "x$gtest" = "xyes"])
|
||||
AC_CONFIG_SUBDIRS([gtest/googletest])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
|
|
|
|||
1
gtest
Submodule
1
gtest
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
|
||||
Loading…
Add table
Add a link
Reference in a new issue