Merge pull request #8 from spoonless/mingw_xcompil

fixing cross compilation on Linux for MINGW gcc 4.8.2
This commit is contained in:
Kjell Hedstrom 2015-03-30 20:52:44 +02:00
commit b3b30a7eaf
2 changed files with 5 additions and 3 deletions

View File

@ -24,14 +24,16 @@ ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
MESSAGE("cmake for GCC ")
IF (APPLE)
set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP")
ELSEIF (MINGW)
set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
ELSE()
set(PLATFORM_LINK_LIBRIES rt)
set(CMAKE_CXX_FLAGS "-Wall -rdynamic -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
ENDIF()
ENDIF()
ELSEIF (MSVC OR MINGW)
IF (MSVC OR MINGW)
set(PLATFORM_LINK_LIBRIES dbghelp)
# VC11 bug: http://code.google.com/p/googletest/issues/detail?id=408
# add_definition(-D_VARIADIC_MAX=10)

View File

@ -15,7 +15,7 @@
#include "stacktrace_windows.hpp"
#include "g2log.hpp"
#include <windows.h>
#include <DbgHelp.h>
#include <dbghelp.h>
#include <map>
#include <memory>
#include <atomic>