Bring _VARIADIC_MAX=10 out of MSVC AND WIN32 context

This commit is contained in:
denchat 2019-05-09 17:59:21 +07:00 committed by GitHub
parent 39a140ac9d
commit 032ac28c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")