From 4fdacb9b2a614c62ee8c03e2035a1cb800417bcf Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Thu, 2 Feb 2017 18:31:54 +0100 Subject: [PATCH] Fix building gtest library on mingw See https://github.com/google/googletest/issues/893 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb2682b881..9b77bfd289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -449,6 +449,7 @@ IF (UNIX) ENDIF (UNIX) IF (MINGW) SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -std=gnu99") + SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWINVER=0x0500") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 ENDIF (MINGW) IF (APPLE) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedef")