Mercurial > hg > orthanc
changeset 1969:5e40f88f4eba
fix for old versions of mingw
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 Apr 2016 12:53:42 +0200 |
parents | e7ae0185b77e |
children | a1c1c606ce98 |
files | Resources/CMake/Compiler.cmake UnitTestsSources/UnitTestsMain.cpp |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Mon Apr 11 12:40:25 2016 +0200 +++ b/Resources/CMake/Compiler.cmake Mon Apr 11 12:53:42 2016 +0200 @@ -103,8 +103,8 @@ if (CMAKE_COMPILER_IS_GNUCXX) # Some additional C/C++ compiler flags for MinGW - SET(MINGW_NO_WARNINGS "-Wno-int-to-pointer-cast -Wno-unused-function -Wno-unused-variable") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MINGW_NO_WARNINGS} -Wno-pointer-to-int-cast -Wno-unused-but-set-variable") + SET(MINGW_NO_WARNINGS "-Wno-unused-function -Wno-unused-variable") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MINGW_NO_WARNINGS} -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MINGW_NO_WARNINGS}") # This is a patch for MinGW64
--- a/UnitTestsSources/UnitTestsMain.cpp Mon Apr 11 12:40:25 2016 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Mon Apr 11 12:53:42 2016 +0200 @@ -563,9 +563,9 @@ ASSERT_EQ(true, Toolbox::ReadHeader(h, path.c_str(), 1)); ASSERT_EQ(1, h.size()); ASSERT_EQ('H', h[0]); - ASSERT_EQ(true, Toolbox::ReadHeader(h, path.c_str(), 0)); + ASSERT_TRUE(Toolbox::ReadHeader(h, path.c_str(), 0)); ASSERT_EQ(0, h.size()); - ASSERT_EQ(false, Toolbox::ReadHeader(h, path.c_str(), 32)); + ASSERT_FALSE(Toolbox::ReadHeader(h, path.c_str(), 32)); ASSERT_EQ(11u, h.size()); ASSERT_EQ(0, memcmp(s.c_str(), h.c_str(), s.size())); }