From 24064a7109d3e04be3fabdcd6b37c1b7c8597796 Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Mon, 6 Jun 2022 19:03:29 +0200 Subject: [PATCH] Disable MSVC-specific stdlib deprecation warnings --- CMakeLists.txt | 1 + test/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67a27a0..a7c8bed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,6 +277,7 @@ target_compile_definitions(${PROJECT_NAME} $<$:SODIUM_DLL_EXPORT> $<$:USE_BLOCKING_RANDOM> $<$:MINIMAL> + $<$:_CRT_SECURE_NO_WARNINGS> ) # Variables that need to be exported to version.h.in diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a5b5531..5542118 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,6 +13,11 @@ function(make_test name) ${PROJECT_SOURCE_DIR}/libsodium/test/quirks/ ) + target_compile_definitions(${name} + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> + ) + add_test( NAME ${name} COMMAND ${name}