diff options
author | evpobr <evpobr@gmail.com> | 2020-04-08 10:28:27 +0500 |
---|---|---|
committer | Ralph Giles <giles@thaumas.net> | 2020-04-08 16:50:49 -0700 |
commit | 4d963fe0b4ba3bdb45233de4b959ce2f36963f7a (patch) | |
tree | 019de5f7ac88e138d930f90b3a39903a273d15a4 | |
parent | 1ffc217cb77636d1a06939638d14c583e1e89525 (diff) | |
download | libvorbis-git-4d963fe0b4ba3bdb45233de4b959ce2f36963f7a.tar.gz |
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 <giles@thaumas.net>
-rw-r--r-- | lib/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
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}) |