blob: b5c3a7c34da7c992c2f43f761599bbc1fe534b0a [file] [log] [blame]
Christopher Ferris70ca5e52014-02-04 22:09:16 -08001#######################################################
2## Shared definitions for all target test compilations.
3#######################################################
4
Dan Willemsen9416c202016-12-21 20:27:06 -08005ifeq ($(LOCAL_GTEST),true)
6 LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING
Christopher Ferris70ca5e52014-02-04 22:09:16 -08007
Dan Willemsen9416c202016-12-21 20:27:06 -08008 ifndef LOCAL_SDK_VERSION
Dan Albertb05cf542016-03-22 17:19:03 -07009 LOCAL_STATIC_LIBRARIES += libgtest_main libgtest
Dan Willemsen9416c202016-12-21 20:27:06 -080010 else
Dan Albert19fbd1c2018-01-04 13:34:21 -080011 # TODO(danalbert): Remove the suffix from the module since we only need the
12 # one variant now.
13 my_ndk_gtest_suffix := _c++
Dan Albertb05cf542016-03-22 17:19:03 -070014 LOCAL_STATIC_LIBRARIES += \
15 libgtest_main_ndk$(my_ndk_gtest_suffix) \
16 libgtest_ndk$(my_ndk_gtest_suffix)
Dan Willemsen9416c202016-12-21 20:27:06 -080017 endif
Dan Albert965bfef2014-05-14 14:16:47 -070018endif
Christopher Ferris70ca5e52014-02-04 22:09:16 -080019
Colin Cross8c141e72014-03-24 18:39:18 -070020ifdef LOCAL_MODULE_PATH
21$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE))
Christopher Ferris70ca5e52014-02-04 22:09:16 -080022endif
Colin Cross8c141e72014-03-24 18:39:18 -070023
24ifdef LOCAL_MODULE_PATH_32
25$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE))
26endif
27
28ifdef LOCAL_MODULE_PATH_64
29$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE))
30endif
31
Dan Willemsen7fe992c2016-03-02 13:54:51 -080032ifndef LOCAL_MODULE_RELATIVE_PATH
33LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE)
34endif