Skip to content

Commit 40d8d4a

Browse files
committed
CXX-135 Provide _VARIADIC_MAX to make gtest happy with MSVC 2012
1 parent ae9703d commit 40d8d4a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SConstruct

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,13 @@ def doConfigure(myenv):
13551355
if haveUUThread:
13561356
myenv.Append(CPPDEFINES=['MONGO_HAVE___THREAD'])
13571357

1358+
if using_msvc():
1359+
# TODO: This is really only needed for MSVC 12, but we have no current way to know
1360+
# which MSVC version we have. Presuming that this is harmless on other MSVC
1361+
# implementations. Without this, gtest doesn't build. We need to apply universally, not
1362+
# just while builing gtest.
1363+
myenv.Append(CPPDEFINES=[('_VARIADIC_MAX', 10)])
1364+
13581365
conf = Configure(myenv)
13591366
libdeps.setup_conftests(conf)
13601367

0 commit comments

Comments
 (0)