From: Kefu Chai Date: Sat, 20 Jun 2020 04:01:55 +0000 (+0800) Subject: cmake: only apply C++ compile options to C++ language X-Git-Tag: v16.1.0~1994^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35682%2Fhead;p=ceph.git cmake: only apply C++ compile options to C++ language we have sources written in C language, and they are compiled along with C++ source files which uses Seastar library. so when the C compiler sees the options exposed by seastar, it complains like 1: warning: command line option '-fconcepts' is valid for C++/ObjC++ but not for C with this change, only C++ options is added for C++ language. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index e30aef360fec..6eb60b0c255a 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -8,7 +8,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GR endif() set_target_properties(crimson::cflags PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${crimson_cflag_definitions}" - INTERFACE_COMPILE_OPTIONS "-Wno-non-virtual-dtor" + INTERFACE_COMPILE_OPTIONS $<$:-Wno-non-virtual-dtor> INTERFACE_LINK_LIBRARIES Seastar::seastar) set(crimson_common_srcs