base: Update non-MSVC compile options

This commit is contained in:
tytan652 2022-08-14 16:22:38 +02:00 committed by tt2468
parent 62bdbb2e64
commit 0ff90d1687

View File

@ -155,15 +155,18 @@ endif()
# Random other things # Random other things
if(WIN32) if(WIN32)
add_definitions(-D_WEBSOCKETPP_CPP11_STL_) add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
endif()
if(MSVC)
target_compile_options(obs-websocket PRIVATE /wd4267 /wd4996) target_compile_options(obs-websocket PRIVATE /wd4267 /wd4996)
elseif(UNIX AND NOT APPLE) else()
target_compile_options( target_compile_options(
obs-websocket PRIVATE -Wall -Wextra -Wno-missing-field-initializers obs-websocket
-Wno-variadic-macros -Wno-error=format-overflow) PRIVATE
elseif(APPLE) -Wall
target_compile_options( "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-error=format-overflow>"
obs-websocket PRIVATE -Wno-error=null-pointer-subtraction "$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wno-error=null-pointer-subtraction;-Wno-error=deprecated-declarations>"
-Wno-error=deprecated-declarations) )
endif() endif()
# Final CMake helpers # Final CMake helpers