mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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 $<COMPILE_LANGUAGE:CXX> so that it only applies to C++ compilations. Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
This commit is contained in:
parent
2286265c0a
commit
82ab9cc2e3
@ -502,7 +502,7 @@ if(WITH_CRIMSON)
|
||||
target_compile_options(seastar
|
||||
PUBLIC
|
||||
# required by any target that links to seastar
|
||||
"-Wno-non-virtual-dtor"
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:-Wno-non-virtual-dtor>"
|
||||
PRIVATE
|
||||
"-DSEASTAR_NO_EXCEPTION_HACK"
|
||||
"-Wno-error"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user