mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 07:11:52 +08:00
librhash: Disable warnings to avoid changing 3rd party code
Add '-w' or equivalent flag on compilers supporting it. Tell MSVC to use its lowest warning level inside librhash sources.
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
project(librhash C)
|
project(librhash C)
|
||||||
|
|
||||||
|
# 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()
|
||||||
|
|
||||||
set(librhash_sources
|
set(librhash_sources
|
||||||
librhash/algorithms.c
|
librhash/algorithms.c
|
||||||
librhash/algorithms.h
|
librhash/algorithms.h
|
||||||
|
@@ -5,6 +5,10 @@
|
|||||||
/* Include KWSys Large File Support configuration. */
|
/* Include KWSys Large File Support configuration. */
|
||||||
#include <cmsys/Configure.h>
|
#include <cmsys/Configure.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if _MSC_VER >= 1300
|
#if _MSC_VER >= 1300
|
||||||
|
|
||||||
# define int64_t __int64
|
# define int64_t __int64
|
||||||
|
Reference in New Issue
Block a user