From 4d963fe0b4ba3bdb45233de4b959ce2f36963f7a Mon Sep 17 00:00:00 2001 From: evpobr Date: Wed, 8 Apr 2020 10:28:27 +0500 Subject: Silence some CMake build MSVC useless warnings Supress warnings about unsafe and deprecated functions like this: strcat is unsafe, use `strcat_s` instead and so on. Signed-off-by: Ralph Giles --- lib/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7e8ca456..7cd68e50 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -67,6 +67,12 @@ if(WIN32) list(APPEND VORBISFILE_SOURCES ../win32/vorbisfile.def) endif() +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + if (NOT BUILD_FRAMEWORK) add_library(vorbis ${VORBIS_HEADERS} ${VORBIS_SOURCES}) add_library(vorbisenc ${VORBISENC_SOURCES}) -- cgit v1.2.1