aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-10-20 16:06:44 -0700
committerAdam Lesinski <adamlesinski@google.com>2014-10-20 16:06:44 -0700
commit318217a84a05880f5e10ba2086f87eb0320772c7 (patch)
tree5027a93da2493afb71fd5f3c7c8a6671ad5445b0
parent327180f5d2009be990076f152dffb244939b1673 (diff)
downloadbuild-lollipop-dev.tar.gz
Enable building of gtest for Windowslollipop-dev
Windows does not have pthread support, and by defining the GTEST_OS_WINDOWS flag, pthread support will not be built into the windows version of gtest. Change-Id: I0571fc52e77bb04175470d5750a7e2f46cdd5e86
-rw-r--r--core/host_test_internal.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk
index 426c400ad2..691468d397 100644
--- a/core/host_test_internal.mk
+++ b/core/host_test_internal.mk
@@ -2,7 +2,14 @@
## Shared definitions for all host test compilations.
#####################################################
-LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
+ifeq ($(HOST_OS),windows)
+LOCAL_CFLAGS += -DGTEST_OS_WINDOWS
+else
+LOCAL_CFLAGS += -DGTEST_OS_LINUX
+LOCAL_LDLIBS += -lpthread
+endif
+
+LOCAL_CFLAGS += -DGTEST_HAS_STD_STRING -O0 -g
LOCAL_C_INCLUDES += external/gtest/include
ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
@@ -12,4 +19,3 @@ LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host
LOCAL_SHARED_LIBRARIES +=
endif
-LOCAL_LDLIBS += -lpthread