Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: Makefile.am

Issue 1638653002: test: allow use of system gmock/gtest libs (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile.am
diff --git a/Makefile.am b/Makefile.am
index ccb43a59b4f54642fecafce3da56720492407ab7..41658540263590a801e5c93f0e6a507076426dac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -113,12 +113,17 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
## Common test logic
+if SYSTEM_TEST_LIBS
+TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS)
+TEST_LIBS = $(GTEST_LIBS) -lgtest_main $(GMOCK_LIBS)
+else
TEST_CFLAGS = \
-I$(top_srcdir)/src/testing/include \
-I$(top_srcdir)/src/testing/gtest/include \
-I$(top_srcdir)/src/testing/gtest \
-I$(top_srcdir)/src/testing
TEST_LIBS = src/testing/libtesting.a
+endif
## Libraries
check_LIBRARIES =
@@ -131,12 +136,14 @@ CLEANFILES =
check_LIBRARIES += src/testing/libtesting.a
+if !SYSTEM_TEST_LIBS
src_testing_libtesting_a_SOURCES = \
src/testing/gtest/src/gtest-all.cc \
src/testing/gtest/src/gtest_main.cc \
src/testing/src/gmock-all.cc
src_testing_libtesting_a_CPPFLAGS = \
$(AM_CPPFLAGS) $(TEST_CFLAGS)
+endif
if !DISABLE_PROCESSOR
lib_LIBRARIES += src/libbreakpad.a
@@ -519,7 +526,8 @@ src_client_linux_linux_client_unittest_LDFLAGS += \
endif
src_client_linux_linux_client_unittest_LDADD = \
- src/client/linux/linux_client_unittest_shlib
+ src/client/linux/linux_client_unittest_shlib \
+ $(TEST_LIBS)
src_client_linux_linux_client_unittest_DEPENDENCIES = \
src/client/linux/linux_client_unittest_shlib
« no previous file with comments | « no previous file | Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698