forked from qt-creator/qt-creator
libarchive: Suppress MSVC warnings
Also in bzip2 and xz. Examples: lz_decoder.h(165): warning C4267: 'initializing': conversion from 'size_t' to 'uint32_t', possible loss of data stream_flags_encoder.c(68): warning C4244: 'function': conversion from 'const lzma_vli' to 'uint32_t', possible loss of data bzlib.c(1423): warning C4996: 'setmode': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _setmode. See online help for details. Change-Id: Ic3f97cd1a333852e3abc2d8bf7742529adbb1dbe Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
55290588d9
commit
97a9a563eb
6
src/libs/3rdparty/bzip2/CMakeLists.txt
vendored
6
src/libs/3rdparty/bzip2/CMakeLists.txt
vendored
@@ -14,9 +14,11 @@ add_qtc_library(qtcBZip2
|
||||
.
|
||||
)
|
||||
|
||||
IF (NOT MSVC)
|
||||
if (MSVC)
|
||||
target_compile_options(qtcBZip2 PUBLIC /wd4244 /wd4267 /wd4996)
|
||||
else()
|
||||
# Disable warnings
|
||||
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(qtcBZip2 PRIVATE "-Wno-unused-parameter")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(qtcBZip2 PRIVATE "-Wimplicit-fallthrough=0" "-Wno-unused-parameter")
|
||||
|
4
src/libs/3rdparty/libarchive/CMakeLists.txt
vendored
4
src/libs/3rdparty/libarchive/CMakeLists.txt
vendored
@@ -23,7 +23,9 @@ endif()
|
||||
target_compile_definitions(archive_static PRIVATE
|
||||
"PLATFORM_CONFIG_H=\"${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_CONFIG_H}\"")
|
||||
|
||||
if (NOT WIN32)
|
||||
if (MSVC)
|
||||
target_compile_options(archive_static PUBLIC /wd4996)
|
||||
elseif (NOT WIN32)
|
||||
find_package(Iconv REQUIRED)
|
||||
target_link_libraries(archive_static PRIVATE ${Iconv_LIBRARY})
|
||||
endif()
|
||||
|
3
src/libs/3rdparty/xz/CMakeLists.txt
vendored
3
src/libs/3rdparty/xz/CMakeLists.txt
vendored
@@ -108,6 +108,9 @@ add_qtc_library(qtcXz STATIC
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(qtcXz PRIVATE MYTHREAD_VISTA)
|
||||
if(MSVC)
|
||||
target_compile_options(qtcXz PUBLIC /wd4244 /wd4267)
|
||||
endif()
|
||||
else()
|
||||
target_compile_definitions(qtcXz PRIVATE MYTHREAD_POSIX)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user