From 0ff90d168715340b3d0383aa4116417495b8f1ca Mon Sep 17 00:00:00 2001 From: tytan652 Date: Sun, 14 Aug 2022 16:22:38 +0200 Subject: [PATCH] base: Update non-MSVC compile options --- CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44188e5f..66fa0da3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,15 +155,18 @@ endif() # Random other things if(WIN32) add_definitions(-D_WEBSOCKETPP_CPP11_STL_) +endif() + +if(MSVC) target_compile_options(obs-websocket PRIVATE /wd4267 /wd4996) -elseif(UNIX AND NOT APPLE) +else() target_compile_options( - obs-websocket PRIVATE -Wall -Wextra -Wno-missing-field-initializers - -Wno-variadic-macros -Wno-error=format-overflow) -elseif(APPLE) - target_compile_options( - obs-websocket PRIVATE -Wno-error=null-pointer-subtraction - -Wno-error=deprecated-declarations) + obs-websocket + PRIVATE + -Wall + "$<$:-Wno-error=format-overflow>" + "$<$:-Wno-error=null-pointer-subtraction;-Wno-error=deprecated-declarations>" + ) endif() # Final CMake helpers