fix mingw build (#152)

This commit is contained in:
Aleksey Dobrunov 2017-02-19 22:50:58 +05:00 committed by Kjell Hedström
parent 3305652de5
commit a48a4860fd

View File

@ -54,11 +54,12 @@ ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(PLATFORM_LINK_LIBRIES rt)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -lrt -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
ENDIF()
ELSEIF(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # source code already in utf-8, force it for compilers in non-utf8_windows_locale
ENDIF()
IF (MSVC OR MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # source code already in utf-8, force it for compilers in non-utf8_windows_locale
set(PLATFORM_LINK_LIBRIES dbghelp)
# VC11 bug: http://code.google.com/p/googletest/issues/detail?id=408
# add_definition(-D_VARIADIC_MAX=10)