From 562f9d256d30fdd2a4200109e0f79ba57d05f488 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 12 Feb 2018 18:43:32 -0700 Subject: [PATCH] Fix GTest workaround on MSVC --- cmake/HandleGTest.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/HandleGTest.cmake b/cmake/HandleGTest.cmake index 9123babf..3cf8e18b 100644 --- a/cmake/HandleGTest.cmake +++ b/cmake/HandleGTest.cmake @@ -27,7 +27,9 @@ macro(build_external_gtest) # -Werror=unused-function fires during the build on OS X. This is a temporary # workaround to keep our travis bots from failing. It should be removed # once gtest is fixed. - list(APPEND GTEST_FLAGS "-Wno-unused-function") + if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + list(APPEND GTEST_FLAGS "-Wno-unused-function") + endif() split_list(GTEST_FLAGS) ExternalProject_Add(googletest EXCLUDE_FROM_ALL ON