From 5f5e977eefbd2522c6d85b70465e65c4ddaee05a Mon Sep 17 00:00:00 2001 From: Cong Date: Sun, 21 May 2017 20:05:56 +1000 Subject: MSVC only warn up to level 3 enet produces warnings at level 4, which can interrupt compiles if warnings are treated as errors. Turning down the warning level resolves the issue. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fe2f1b..c3c561a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,9 @@ check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" H set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h") check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY) unset(CMAKE_EXTRA_INCLUDE_FILES) +if(MSVC) + add_definitions(-W3) +endif() if(HAS_FCNTL) add_definitions(-DHAS_FCNTL=1) -- cgit v1.2.3