]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/alienstore/CMakeLists: Cleanup alien::cflags interface
authorMatan Breizman <mbreizma@redhat.com>
Mon, 9 Jun 2025 07:58:29 +0000 (07:58 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 3 Jul 2025 07:57:23 +0000 (07:57 +0000)
alienstore FTBFS [1] due to virtual-dtor warning when compiling seastar [2].
Instead of using alien::cflags which define INTERFACE_COMPILE_OPTIONS of
-Wno-non-virtual-dtor - Let's directly add this compile option to
tagets using seastar.

Crimson non-alien targets solve that with crimson::cflags which
defines the relevant compile flag. However, we don't reuse it here since
it also carries WITH_CRIMSON.

As both crimson::cflags and crimson-alienstore which are using seastar
have to set no-non-virtual-dtor - The compile option moved to the common
cmake file instead of setting it in both targets.

[1]
```
crimson/os/alienstore/alien_log.cc:21:28:   required from here
seastar/include/seastar/core/future.hh:666:7:
warning: ‘class seastar::continuation_base<void>’ has virtual functions
and accessible non-virtual destructor [-Wnon-virtual-dtor]
```

[2] See 36963dd7ccd50eff2f8b91d97ffb66295a7a6292

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/CMakeLists.txt
src/crimson/CMakeLists.txt
src/crimson/os/alienstore/CMakeLists.txt

index 8a92da63dd9fcc5c543c0c2fc6573fd750f38e1a..b4b2c349a6a46f43c0258d5cfcbc891612c7deec 100644 (file)
@@ -485,6 +485,8 @@ if(WITH_CRIMSON)
   # target: Seastar exports this directory created at build-time
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/include")
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/src")
+  # required by any target that links to seastar
+  target_compile_options(seastar PUBLIC "-Wno-non-virtual-dtor")
   add_subdirectory(crimson)
 endif()
 
index c86ac5ae12afe2ab4a9418d71656cfd9375b6d04..edeb04a1d802d20130e00553de6a1b8023b38158 100644 (file)
@@ -3,7 +3,6 @@ set(crimson_cflag_definitions "WITH_CRIMSON=1")
 
 set_target_properties(crimson::cflags PROPERTIES
   INTERFACE_COMPILE_DEFINITIONS "${crimson_cflag_definitions}"
-  INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:-Wno-non-virtual-dtor>
   INTERFACE_LINK_LIBRARIES Seastar::seastar)
 
 set(crimson_common_srcs
index 3037bc74bbc3f817206b82fb35179095a9d62df2..18d9d8b99dccb7f90e91921760a5b8e6ca1d872b 100644 (file)
@@ -36,10 +36,6 @@ if(WITH_BREAKPAD)
   target_link_libraries(crimson-alien-common Breakpad::client)
 endif()
 
-add_library(alien::cflags INTERFACE IMPORTED)
-set_target_properties(alien::cflags PROPERTIES
-  INTERFACE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:Seastar::seastar,INTERFACE_INCLUDE_DIRECTORIES>)
-
 set(alien_store_srcs
   alien_store.cc
   thread_pool.cc
@@ -77,12 +73,11 @@ endif()
 # For crimson-alienstore WITH_CRIMSON is not defined
 target_link_libraries(crimson-alienstore
   PRIVATE
-    alien::cflags
+    seastar
     ${FMT_LIB}
     kv
     heap_profiler
     crimson-alien-common
     ${BLKID_LIBRARIES}
     ${UDEV_LIBRARIES}
-    seastar
     blk)