diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index eaba4da..0d77cf1 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,6 +1,11 @@ if (NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_DEFAULT} -std=c99 -Wall -Wextra -pedantic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEFAULT} ${CXX11_FLAG} -Wall -Wextra -pedantic") + + if (MINGW) + # see http://sourceforge.net/p/mingw/bugs/2250/ + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__NO_INLINE__") + endif () endif () include_directories(../include) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d224b12..2fb12a4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,11 @@ if (NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_DEFAULT} -std=gnu99 -Wall -Wextra") if (CMAKE_CXX_COMPILER_WORKS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEFAULT} ${CXX11_FLAG} -Wall -Wextra") + + if (MINGW) + # see http://sourceforge.net/p/mingw/bugs/2250/ + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__NO_INLINE__") + endif () endif () endif ()