expat: Suppress compiler warnings

We are not developing expat so we do not care about warnings.
This commit is contained in:
Brad King 2016-05-05 15:15:02 -04:00
parent f177c8a0a7
commit 58216d1694
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,11 @@
# Disable warnings to avoid changing 3rd party code.
IF(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
ENDIF()
include(ConfigureChecks.cmake)
if(WIN32)
add_definitions(-DCOMPILING_FOR_WINDOWS)

View File

@ -19,4 +19,9 @@
#include "expat_config.h"
#if defined(_MSC_VER)
# pragma warning(push,1)
# pragma warning(disable:4311) /* pointer truncation */
#endif
#endif /* ndef WINCONFIG_H */