Commit 9a8524d5 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "test_libvpx: disable pthreads in gtest for win targets"

parents 11442353 e4d2c255
Branches
Tags
No related merge requests found
Showing with 13 additions and 1 deletion
...@@ -682,6 +682,14 @@ process_toolchain() { ...@@ -682,6 +682,14 @@ process_toolchain() {
# iOS/ARM builds do not work with gtest. This does not match # iOS/ARM builds do not work with gtest. This does not match
# x86 targets. # x86 targets.
;; ;;
*-win*)
# Some mingw toolchains don't have pthread available by default.
# Treat these more like visual studio where threading in gtest
# would be disabled for the same reason.
check_cxx "$@" <<EOF && soft_enable unit_tests
int z;
EOF
;;
*) *)
enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
int z; int z;
......
...@@ -448,6 +448,10 @@ else ...@@ -448,6 +448,10 @@ else
include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk
GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS)) GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS))
GTEST_OBJS=$(call objs,$(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
$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS) OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS)
...@@ -472,7 +476,7 @@ $(foreach bin,$(LIBVPX_TEST_BINS),\ ...@@ -472,7 +476,7 @@ $(foreach bin,$(LIBVPX_TEST_BINS),\
lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\ lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\
$(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\ $(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\
$(LIBVPX_TEST_OBJS) \ $(LIBVPX_TEST_OBJS) \
-L. -lvpx -lgtest -lpthread -lm)\ -L. -lvpx -lgtest $(extralibs) -lm)\
)))\ )))\
$(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\ $(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment