From 56a1ced21428a33716f7383d7401be39378dd7f2 Mon Sep 17 00:00:00 2001 From: Leonardo Carreras Date: Tue, 27 Feb 2024 11:45:51 +0100 Subject: [PATCH] Add definition to silence MSVC error C2220 Signed-off-by: Leonardo Carreras --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed1bcafe9c..55bbcc8466 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,9 @@ if(MSVC) add_definitions(-D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS) add_definitions(-D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING) + # Silence Visual Studio error C2220 + add_definitions(-D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) + # Set exception handling for portability set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")