From be22ef9ed4f4640a17404bedc66a52698bd8ad15 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 11 Dec 2024 17:36:55 +0200 Subject: [PATCH] karchive: Suppress MSVC warnings Sample warnings: k7zip.cpp(70): warning C4005: 'FILE_ATTRIBUTE_READONLY': macro redefinition C4244: '=': conversion from '__int64' to 'Int32', possible loss of data C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write. See online help for details. Change-Id: If37c98964ddc19517491829f75aa203228585c90 Reviewed-by: Marcus Tillmanns --- src/libs/3rdparty/karchive/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/3rdparty/karchive/CMakeLists.txt b/src/libs/3rdparty/karchive/CMakeLists.txt index 41a595d728b..a8643e4d433 100644 --- a/src/libs/3rdparty/karchive/CMakeLists.txt +++ b/src/libs/3rdparty/karchive/CMakeLists.txt @@ -282,6 +282,10 @@ extend_qtc_library( ./3rdparty/xz/src/liblzma/simple/x86.c ) +if(MSVC) + target_compile_options(karchive PUBLIC /wd4005 /wd4244 /wd4267 /wd4996) +endif() + # Zstd support # BSD License: https://github.com/facebook/zstd/blob/dev/LICENSE # Disabled for now as we don't need it and the packages are suboptimal