From 0692d1d28c8b2886df43ba9b2f0069d5bc32a48c Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 25 Mar 2026 17:11:46 +0100 Subject: [PATCH] Avoid passing a C++-only flag when compiling C files Avoids compiler warnings. This can happen because zlib and libpng are both C projects, and we build them from source if they are unavailable. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cb6f2aa..9ce4b025 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ if(MSVC) add_compile_options(/fsanitize=address) # Note that this shouldn't be passed to the linker. endif() else() - add_compile_options(-Wall -pedantic -fno-exceptions -fno-rtti -Wno-unknown-warning-option + add_compile_options(-Wall -pedantic -fno-exceptions $<$:-fno-rtti> -Wno-unknown-warning-option # C++20 allows macros to take zero variadic arguments. # Some versions of Clang don't recognize this, and treat them as a GNU extension. -Wno-gnu-zero-variadic-macro-arguments)