From b6db4b8a26411416aa9c339caf0115c71be5eb81 Mon Sep 17 00:00:00 2001 From: denchat <19730041+denchat@users.noreply.github.com> Date: Thu, 9 May 2019 18:48:28 +0700 Subject: [PATCH] Turns out that I misunderstood MSVC --- test/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9a005ca9..58c62f0e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,18 +21,17 @@ if (NOT SUPPORTS_VARIADIC_TEMPLATES) target_compile_definitions(gmock PUBLIC GTEST_LANG_CXX11=0) endif () -# Workaround a bug in implementation of variadic templates in MSVC11. if (MSVC) + # Workaround a bug in implementation of variadic templates in MSVC11. 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") # Disable MSVC warnings of POSIX functions. target_compile_options(gmock PUBLIC -Wno-deprecated-declarations) endif () + # Insert FMT_MSVC_EH if user provides. # if not, default to /EHsc in clang target msvc. if (FMT_MSVC_EH)