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.
This commit is contained in:
Cong 2017-05-21 20:05:56 +10:00 committed by GitHub
parent 3ae5af4548
commit 5f5e977eef

View file

@ -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)