shithub: openh264

Download patch

ref: 113fb8c104bbea9ec20c57ef13add1d9958048f8
parent: af2a3542025b34232a656d314f660ae6fc6c3d8a
author: Martin Storsjö <[email protected]>
date: Fri Jan 17 05:58:13 EST 2014

Set GTEST_HAS_TR1_TUPLE to 0 on msvc

This fixes building of gtest on msvc.

See e.g. http://stackoverflow.com/questions/8274588 for
more discussion on the matter.

This is only required on MSVC 2012 - gtest itself (in the cmake
files) adds -D_VARIADIC_MAX=10 to the build when building using
MSVC 2012, but we don't know the MSVC version at the make stage
here. Since the gtest tuple support isn't used at all, it's
simpler to just disable it altogether than to try to add
-D_VARIADIC_MAX=10.

--- a/build/platform-msvc-common.mk
+++ b/build/platform-msvc-common.mk
@@ -2,7 +2,7 @@
 CXX=cl
 AR=lib
 CXX_O=-Fo$@
-CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope
+CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -DGTEST_HAS_TR1_TUPLE=0
 CXX_LINK_O=-nologo -Fe$@
 AR_OPTS=-nologo -out:$@
 CFLAGS_OPT=-O2 -Ob1 -Oy- -Zi -GF -Gm- -GS -Gy -MD -DNDEBUG