diff options
author | James Zern <jzern@google.com> | 2013-06-26 18:35:11 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2013-06-26 18:35:11 -0700 |
commit | e4d2c255f116f179796d43259a52a8c1f257d827 (patch) | |
tree | 87dbf5c5af07e32e5c156392d4a0627065046a7a /libs.mk | |
parent | a9e7243d1a7447f1596d9af97fce6d81ad1bc12b (diff) | |
download | libvpx-e4d2c255f116f179796d43259a52a8c1f257d827.tar.gz |
test_libvpx: disable pthreads in gtest for win targets
currently threading is internal to libvpx so thread safety is unneeded
in libgtest -- visual studio builds already operate in this way as they
do not have pthread.h available by default.
this removes an unconditional link to libpthread using $(extralibs)
should libvpx require it.
Change-Id: I2f278b711f533d0f4d8a6c896833e3e2237d1f45
Diffstat (limited to 'libs.mk')
-rw-r--r-- | libs.mk | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -448,6 +448,10 @@ else include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS)) GTEST_OBJS=$(call objs,$(GTEST_SRCS)) +ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) +# Disabling pthreads globally will cause issues on darwin and possibly elsewhere +$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 +endif $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS) @@ -472,7 +476,7 @@ $(foreach bin,$(LIBVPX_TEST_BINS),\ lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\ $(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\ $(LIBVPX_TEST_OBJS) \ - -L. -lvpx -lgtest -lpthread -lm)\ + -L. -lvpx -lgtest $(extralibs) -lm)\ )))\ $(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\ |