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>
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"