Skip to content
Browse files

Fix building of gtest with --enable-warnings + --enable-werror

Change-Id: I215d09564b2830cbdd44db1abd723da2aa785d5c
Reviewed-on: http://review.couchbase.org/15967
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information...
1 parent 96b65ae commit 877bacc6af6c1c10ba1cec3fa7b0d628173e792c @trondn trondn committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 Makefile.am
View
9 Makefile.am
@@ -16,6 +16,7 @@
ACLOCAL_AMFLAGS = -I m4 --force
lib_LTLIBRARIES = libcbio.la
+noinst_LTLIBRARIES=
pkginclude_HEADERS = \
include/libcbio/cbio.h \
@@ -45,8 +46,12 @@ tests_cbio_unit_tests_DEPENDENCIES = libcbio.la
tests_cbio_unit_tests_LDADD = libcbio.la
if HAVE_GOOGLETEST_SRC
-tests_cbio_unit_tests_SOURCES += tests/gtest-sources.cc
-tests_cbio_unit_tests_CPPFLAGS += -I$(GTEST_ROOT) -I$(GTEST_ROOT)/include
+noinst_LTLIBRARIES = libgtest.la
+libgtest_la_SOURCES = tests/gtest-sources.cc
+libgtest_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(GTEST_ROOT) -I$(GTEST_ROOT)/include \
+ $(NO_WERROR)
+tests_cbio_unit_tests_DEPENDENCIES += libgtest.la
+tests_cbio_unit_tests_LDADD += libgtest.la
endif
if !HAVE_GOOGLETEST_SRC

0 comments on commit 877bacc

Please sign in to comment.
Something went wrong with that request. Please try again.