Fix building gtest library on mingw

See https://github.com/google/googletest/issues/893
This commit is contained in:
Geert Janssens 2017-02-02 18:31:54 +01:00
parent 0a8d7a2142
commit 4fdacb9b2a

View File

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