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

Unified Diff: configure.ac

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 | « configure ('k') | src/breakpad_googletest_includes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: configure.ac
diff --git a/configure.ac b/configure.ac
index cbea712f96152bd050dd72db06dd324055cf6277..18426ae18520633829bb7a21ec9b82480d7f2e64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,6 +135,39 @@ if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools
AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!])
fi
+AC_ARG_ENABLE(system-test-libs,
+ AS_HELP_STRING([--enable-system-test-libs],
+ [Use gtest/gmock/etc... from the system instead ]
+ [of the local copies (default is local)]),
+ [case "${enableval}" in
+ yes)
+ system_test_libs=true
+ ;;
+ no)
+ system_test_libs=false
+ ;;
+ *)
+ AC_MSG_ERROR(bad value ${enableval} for --enable-system-test-libs)
+ ;;
+ esac],
+ [system_test_libs=false])
+AM_CONDITIONAL(SYSTEM_TEST_LIBS, test x$system_test_libs = xtrue)
+
+AC_ARG_VAR([GMOCK_CONFIG], [Path to gmock-config script])
+AC_ARG_VAR([GMOCK_CFLAGS], [Compiler flags for gmock])
+AC_ARG_VAR([GMOCK_LIBS], [Linker flags for gmock])
+AC_ARG_VAR([GTEST_CONFIG], [Path to gtest-config script])
+AC_ARG_VAR([GTEST_CFLAGS], [Compiler flags for gtest])
+AC_ARG_VAR([GTEST_LIBS], [Linker flags for gtest])
+if test x$system_test_libs = xtrue; then
+ AC_CHECK_TOOL([GMOCK_CONFIG], [gmock-config])
+ AC_CHECK_TOOL([GTEST_CONFIG], [gtest-config])
+ GMOCK_CFLAGS=`$GMOCK_CONFIG --cppflags --cxxflags`
+ GMOCK_LIBS=`$GMOCK_CONFIG --ldflags --libs`
+ GTEST_CFLAGS=`$GTEST_CONFIG --cppflags --cxxflags`
+ GTEST_LIBS=`$GTEST_CONFIG --ldflags --libs`
+fi
+
AC_ARG_ENABLE(selftest,
AS_HELP_STRING([--enable-selftest],
[Run extra tests with "make check" ]
« no previous file with comments | « configure ('k') | src/breakpad_googletest_includes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698