$NetBSD: patch-CMakeLists.txt,v 1.2 2019/09/03 20:27:02 adam Exp $

Support NetBSD.

Do not turn warnings into errors.

--- CMakeLists.txt.orig	2019-05-02 05:23:39.000000000 +0000
+++ CMakeLists.txt
@@ -113,6 +113,7 @@ endif()
 
 if (APPLE OR WIN32 OR
     CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR
+    CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR
     CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
   if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
     find_package(intl REQUIRED)
@@ -210,8 +211,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-unreachable-code")
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-documentation")
 
-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=deprecated")
-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=non-pod-varargs")
 
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Qunused-arguments")
 
@@ -275,7 +274,9 @@ IF (WIN32)
 endif (WIN32)
 
 # on BSD this must be explicitly linked
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR
+    CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR
+    CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
   # Not needed on Debian GNU/kFreeBSD..
   if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
     find_library(EXECINFO_LIBRARY NAMES execinfo)
