Am 29.10.25 um 09:11 schrieb Kornel Benko:
commit 735b747dbe317540d6121d8f63b70cf1c8895695 Author: Kornel Benko <[email protected]> Date: Wed Oct 29 09:08:52 2025 +0100Amend ee65f260 Compilation with clang emits new warning (cast-align) --- 3rdparty/zlib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 4e03515c6c..6948dbcf74 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -16,7 +16,7 @@ project(zlib C) set(VERSION "1.3.1") set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${VERSION})-handle_warning_options("zlib" "CC" -Wno-deprecated-non-prototype -Wno-strict-prototypes -Wnested-anon-types -Wno-implicit-fallthrough -Wno-format-nonliteral -Wno-reserved-macro-identifier) +handle_warning_options("zlib" "CC" -Wno-deprecated-non-prototype -Wno-strict-prototypes -Wnested-anon-types -Wno-implicit-fallthrough -Wno-format-nonliteral -Wno-reserved-macro-identifier -Wno-cast-align)
What is the purpose of handle_warning_options? If the goal is to ignore all warnings from thirdparty-code then we should use the SYSTEM keyword for those include directories (see https://cmake.org/cmake/help/latest/command/target_include_directories.html#command:target_include_directories or https://cmake.org/cmake/help/latest/command/include_directories.html) rather than compiler-specific ignore lists IMHO. This works also with MSVC, not just gcc or clang (at least since a few years: https://gitlab.kitware.com/cmake/cmake/-/issues/17904)
Georg -- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel
