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>
# 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()
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
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
# 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)