libuv: 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 libuv sources.
This commit is contained in:
Brad King 2016-08-17 10:16:57 -04:00
parent 13b7e7587d
commit 95dcc4e474
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,13 @@
project(libuv 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()
find_package(Threads)
set(uv_libraries ${CMAKE_THREAD_LIBS_INIT})

View File

@ -22,6 +22,10 @@
#ifndef UV_WIN_INTERNAL_H_
#define UV_WIN_INTERNAL_H_
#if defined(_MSC_VER)
# pragma warning(push,1)
#endif
#include "uv.h"
#include "../uv-common.h"