From: Sun Yuechi Date: Mon, 15 Jun 2026 20:10:15 +0000 (+0800) Subject: crimson/cmake: restrict -Wno-non-virtual-dtor to C++ sources X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82ab9cc2e3609cf0a172b3f322ac4420316c8642;p=ceph.git 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 --- 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"