Skip to content

Commit

Permalink
Suppress numerous libz warnings (#6709)
Browse files Browse the repository at this point in the history
* Suppress numerous libz warnings

zlib will fix this issue later (see madler/zlib#633).
For now we will just turn off the warning.

* Fix Windows build
  • Loading branch information
romainguy authored Apr 4, 2023
1 parent 4624b0d commit 185c68c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions third_party/libassimp/tnt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ if(NOT MSVC)
PRIVATE -Wno-unused-const-variable
PRIVATE -Wno-unused-private-field
PRIVATE -Wno-unused-variable
PRIVATE -Wno-deprecated-non-prototype # See https://github.com/madler/zlib/issues/633
)
else()
target_compile_options(${TARGET} PRIVATE /bigobj)
Expand Down
13 changes: 7 additions & 6 deletions third_party/libz/tnt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ set(SRCS
${SRC_DIR}/zutil.c
)

# we're building a library
add_library(${TARGET} STATIC ${PRIVATE_HDRS} ${PUBLIC_HDRS} ${SRCS})

if (NOT MSVC)
add_definitions(
-Wno-implicit-function-declaration
-Wno-shift-negative-value
target_compile_options(${TARGET}
PRIVATE -Wno-implicit-function-declaration
PRIVATE -Wno-shift-negative-value
PRIVATE -Wno-deprecated-non-prototype # See https://github.com/madler/zlib/issues/633
)
endif()

# we're building a library
add_library(${TARGET} STATIC ${PRIVATE_HDRS} ${PUBLIC_HDRS} ${SRCS})

# specify where the public headers of this library are
target_include_directories (${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)

0 comments on commit 185c68c

Please sign in to comment.