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
|
||||||
15
Makefile.am
15
Makefile.am
|
|
@ -35,8 +35,12 @@ noinst_HEADERS += \
|
||||||
compiler/c++.capnp.h \
|
compiler/c++.capnp.h \
|
||||||
compiler/test.capnp.h
|
compiler/test.capnp.h
|
||||||
|
|
||||||
if GTEST
|
GTEST_LDADD = gtest/googletest/lib/libgtest.la
|
||||||
AM_CXXFLAGS = -std=gnu++11
|
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 += \
|
check_PROGRAMS += \
|
||||||
capn-test
|
capn-test
|
||||||
capn_test_SOURCES = \
|
capn_test_SOURCES = \
|
||||||
|
|
@ -45,7 +49,8 @@ capn_test_SOURCES = \
|
||||||
compiler/test.capnp.c \
|
compiler/test.capnp.c \
|
||||||
compiler/schema-test.cpp \
|
compiler/schema-test.cpp \
|
||||||
compiler/schema.capnp.c
|
compiler/schema.capnp.c
|
||||||
capn_test_CFLAGS = $(GTEST_CFLAGS)
|
capn_test_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_CPPFLAGS)
|
||||||
capn_test_LDADD = libcapnp_c.la $(GTEST_LDFLAGS)
|
capn_test_CXXFLAGS = -std=gnu++11 -pthread
|
||||||
|
capn_test_LDADD = libcapnp_c.la $(GTEST_LDADD)
|
||||||
|
capn_test_LDFLAGS = -pthread
|
||||||
TESTS = capn-test
|
TESTS = capn-test
|
||||||
endif
|
|
||||||
|
|
|
||||||
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_MSG_ERROR([capnproto base package (0.5.2 or newer) not found])
|
||||||
#])
|
#])
|
||||||
|
|
||||||
AC_ARG_WITH(gtest,
|
AC_CONFIG_SUBDIRS([gtest/googletest])
|
||||||
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_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
|
|
|
||||||
1
gtest
Submodule
1
gtest
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue