From 82ab9cc2e3609cf0a172b3f322ac4420316c8642 Mon Sep 17 00:00:00 2001 From: Sun Yuechi Date: Tue, 16 Jun 2026 04:10:15 +0800 Subject: [PATCH] crimson/cmake: restrict -Wno-non-virtual-dtor to C++ sources The seastar target exports -Wno-non-virtual-dtor as a PUBLIC compile option, so it leaks to every target that links seastar, including C sources such as crimson-common's reverse.c, producing: cc1: warning: command-line option '-Wno-non-virtual-dtor' is valid for C++/ObjC++ but not for C Guard the option with $ so that it only applies to C++ compilations. Signed-off-by: Sun Yuechi --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a93a38d7501..b5fd500e8ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -502,7 +502,7 @@ if(WITH_CRIMSON) target_compile_options(seastar PUBLIC # required by any target that links to seastar - "-Wno-non-virtual-dtor" + "$<$:-Wno-non-virtual-dtor>" PRIVATE "-DSEASTAR_NO_EXCEPTION_HACK" "-Wno-error" -- 2.47.3