From 4914bd08b0a3eab9adcf0a1d61d4c149445f7a16 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 20 Jun 2020 12:01:55 +0800 Subject: [PATCH] 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 --- src/crimson/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index e30aef360fecf..6eb60b0c255a7 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 -- 2.39.5