diff options
author | Brad King <brad.king@kitware.com> | 2016-08-17 14:16:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-31 13:05:12 (GMT) |
commit | 95dcc4e474b8ad10fea47c68df88678a6ae10fac (patch) | |
tree | 6d9d29c677e688b19b0dd58c1b43cbfd8e64282a | |
parent | 13b7e7587d50a52bb422852eb4d71a93eb8f18a6 (diff) | |
download | CMake-95dcc4e474b8ad10fea47c68df88678a6ae10fac.zip CMake-95dcc4e474b8ad10fea47c68df88678a6ae10fac.tar.gz CMake-95dcc4e474b8ad10fea47c68df88678a6ae10fac.tar.bz2 |
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.
-rw-r--r-- | Utilities/cmlibuv/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Utilities/cmlibuv/src/win/internal.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 7f2d587..f1faf18 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -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}) diff --git a/Utilities/cmlibuv/src/win/internal.h b/Utilities/cmlibuv/src/win/internal.h index b8cfde9..8a17e94 100644 --- a/Utilities/cmlibuv/src/win/internal.h +++ b/Utilities/cmlibuv/src/win/internal.h @@ -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" |