From 032ac28c1d2c06808bce25a29a747a75a049e061 Mon Sep 17 00:00:00 2001 From: denchat <19730041+denchat@users.noreply.github.com> Date: Thu, 9 May 2019 17:59:21 +0700 Subject: [PATCH] Bring _VARIADIC_MAX=10 out of MSVC AND WIN32 context --- test/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 599774a8..703a310e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,9 +21,12 @@ if (NOT SUPPORTS_VARIADIC_TEMPLATES) target_compile_definitions(gmock PUBLIC GTEST_LANG_CXX11=0) endif () -if (MSVC AND WIN32) - # Workaround a bug in implementation of variadic templates in MSVC11. +# Workaround a bug in implementation of variadic templates in MSVC11. +if (MSVC) target_compile_definitions(gmock PUBLIC _VARIADIC_MAX=10) +endif () + +if (MSVC AND WIN32) # Disable MSVC warnings of _CRT_INSECURE_DEPRECATE functions. target_compile_definitions(gmock PUBLIC _CRT_SECURE_NO_WARNINGS) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")