From d7d7f0cd62c29cce10e29efb1c7de07ecc3d5d6f Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 10 Jan 2024 14:47:19 +0100 Subject: [PATCH] Silence deprecated CRT releated warnings --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a17224a..67fed189 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,12 @@ if (ISLE_BUILD_APP) endif() if (MSVC) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15") + target_compile_definitions(lego1 PRIVATE _CRT_SECURE_NO_WARNINGS) + if (ISLE_BUILD_APP) + target_compile_definitions(isle PRIVATE "_CRT_SECURE_NO_WARNINGS") + endif() + endif() # Visual Studio 2017 version 15.7 needs "/Zc:__cplusplus" for __cplusplus if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.14.26428") target_compile_options(lego1 PRIVATE "-Zc:__cplusplus")