diff options
author | digit@chromium.org <digit@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-08-23 15:45:01 +0000 |
---|---|---|
committer | digit@chromium.org <digit@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-08-23 15:45:01 +0000 |
commit | 13d9e27ef04797cfd00ac56cb1ee37f71d70214e (patch) | |
tree | dbf455ba65a37ab20cffe283bfb863a1665164eb /Makefile.am | |
parent | Pulls in gmock r263, gtest r368, and gyp r1472. (diff) | |
download | breakpad-13d9e27ef04797cfd00ac56cb1ee37f71d70214e.tar.xz |
Fix Breakpad unit tests build for Android.
This patch contains the source-related fixes to ensure that
the Breakpad unit tests build properly when targetting Android.
Calling 'make check' still fails because there is still no
way to run the unit test programs on a device. This will be
addressed by a future patch.
Important notes:
- You must target Android API level 9 (Gingerbread) or higher
to build the unit tests. This requirement is due to the
current GTest revision used in the breakpad source tree.
- This patch adds headers providing inlined C library functions
missing from the NDK (see src/common/android/testing). They
are inlined to avoid modifying Makefile.am and other build
files.
- Similarly, the <wchar.h> header-fix under
src/common/android/testing/include is only required by
GTest's current revision. E.g. it's not needed when building
Breakpad as part of Chromium which uses a more up-to-date
revision.
Review URL: https://breakpad.appspot.com/439002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1020 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 410ca83e..562c0bcf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,14 +32,20 @@ # This allows #includes to be relative to src/ AM_CPPFLAGS = -I$(top_srcdir)/src + +AM_CXXFLAGS = + if ANDROID_HOST # This allows using fixed NDK headers when building for Android. -AM_CPPFLAGS += -I$(top_srcdir)/src/common/android/include +AM_CXXFLAGS += -I$(top_srcdir)/src/common/android/include +# This is only necessary for building the unit tests until GTest is upgraded +# to a future version. +AM_CXXFLAGS += -I$(top_srcdir)/src/common/android/testing/include endif if GCC # These are good warnings to be treated as errors -AM_CXXFLAGS = \ +AM_CXXFLAGS += \ -Werror=non-virtual-dtor \ -Werror=vla \ -Werror=unused-variable \ @@ -351,6 +357,10 @@ src_client_linux_linux_client_unittest_LDADD = \ src/common/linux/safe_readlink.o \ src/common/string_conversion.o \ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) +if ANDROID_HOST +src_client_linux_linux_client_unittest_LDFLAGS = \ + -llog +endif src_client_linux_linux_client_unittest_DEPENDENCIES = \ src/client/linux/linux_dumper_unittest_helper \ |