From 90560cd471ed0a93ce52eae71996d8eeaa752f0c Mon Sep 17 00:00:00 2001 From: Cong Date: Mon, 22 May 2017 10:15:27 +1000 Subject: Don't treat warnings as errors When enet is included as a child CMake project in a parent that has warnings treated as errors, enet fails to build. This ensures that the compiler doesn't treat warnings as errors for enet. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c3c561a..6c99c3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY) unset(CMAKE_EXTRA_INCLUDE_FILES) if(MSVC) add_definitions(-W3) +else() + add_definitions(-Wno-error) endif() if(HAS_FCNTL) -- cgit v1.2.3