From e54bf87e9ba81e061768a526ab2960094924c1a4 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 10 Dec 2022 21:00:31 -0700 Subject: [PATCH] Enable MSVC deprecation warning --- cmake/CompilerWarnings.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index d987f63b5..395075a35 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -38,7 +38,6 @@ function(set_target_warnings target) /permissive- # standards conformance mode # Disables, remove when appropriate - /wd4996 # disable warnings about deprecated functions /wd4068 # disable warnings about unknown pragmas (e.g. #pragma GCC) /wd4505 # disable warnings about unused functions that might be platform-specific /wd4800 # disable warnings regarding implicit conversions to bool @@ -85,4 +84,10 @@ function(set_target_warnings target) -Wno-unknown-warning-option # do not warn on GCC-specific warning diagnostic pragmas ) endif() + + # Disable certain deprecation warnings + if(SFML_OS_WINDOWS) + target_compile_definitions(${target} PRIVATE -D_CRT_SECURE_NO_WARNINGS) + target_compile_definitions(${target} PRIVATE -D_WINSOCK_DEPRECATED_NO_WARNINGS) + endif() endfunction()