瀏覽代碼

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.
Cong 7 年之前
父節點
當前提交
90560cd471
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      CMakeLists.txt

+ 2 - 0
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)