From 0db223b1480f27e266a4a12aa49c00c6d8c88459 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Tue, 26 Jul 2022 21:53:04 +0200 Subject: [PATCH] base: Suppress deps warnings /wd4267 is required by websocketpp -Wno-error=format-overflow is required by asio -Wno-error=null-pointer-subtraction is required by json on macOS -Wno-error=deprecated-declarations is required on macOS because Xcode 14 deprecates sprintf() --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa226830..1abd79b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,7 @@ endif() # Random other things if(WIN32) add_definitions(-D_WEBSOCKETPP_CPP11_STL_) + target_compile_options(obs-websocket PRIVATE /wd4267) # Set the correct Windows preprocessor var for asio macro(get_WIN32_WINNT version) @@ -161,7 +162,10 @@ if(WIN32) elseif(UNIX AND NOT APPLE) target_compile_options( obs-websocket PRIVATE -Wall -Wextra -Wno-missing-field-initializers - -Wno-variadic-macros) + -Wno-variadic-macros -Wno-error=format-overflow) +elseif(APPLE) + target_compile_options( + obs-websocket PRIVATE -Wno-error=null-pointer-subtraction -Wno-error=deprecated-declarations) endif() # Final CMake helpers