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:
parent
13b7e7587d
commit
95dcc4e474
|
@ -1,5 +1,13 @@
|
||||||
project(libuv C)
|
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)
|
find_package(Threads)
|
||||||
|
|
||||||
set(uv_libraries ${CMAKE_THREAD_LIBS_INIT})
|
set(uv_libraries ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
#ifndef UV_WIN_INTERNAL_H_
|
#ifndef UV_WIN_INTERNAL_H_
|
||||||
#define UV_WIN_INTERNAL_H_
|
#define UV_WIN_INTERNAL_H_
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "uv.h"
|
#include "uv.h"
|
||||||
#include "../uv-common.h"
|
#include "../uv-common.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue