From d9314c53447409cc50fcf08561e4714552c24c79 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Mon, 30 Jun 2025 09:11:03 +0000 Subject: [PATCH] CMakeLists: Use target_compile_options for seastar Now that target_compile_options is used to set no-non-virtual-dtor, Move all the other CXX_FLAGS to CMake's compile_options. Added status message of the flags set now that they are no longer stored in a global variable and are as easily accessible. Signed-off-by: Matan Breizman --- src/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b4b2c349a6a46..445d8f2a203df 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -471,22 +471,22 @@ if(WITH_CRIMSON) build_dpdk(${CMAKE_BINARY_DIR}/src/dpdk) endif() endif() - list(APPEND Seastar_CXX_FLAGS - "-DSEASTAR_NO_EXCEPTION_HACK" - "-Wno-error" - "-Wno-sign-compare" - "-Wno-attributes" - "-Wno-pessimizing-move" - "-Wno-address-of-packed-member" - "-Wno-non-virtual-dtor") - set(Seastar_CXX_FLAGS "${Seastar_CXX_FLAGS}" CACHE STRING "" FORCE) add_subdirectory(seastar) # create the directory so cmake won't complain when looking at the imported # 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") + target_compile_options(seastar + PUBLIC + # required by any target that links to seastar + "-Wno-non-virtual-dtor" + PRIVATE + "-DSEASTAR_NO_EXCEPTION_HACK" + "-Wno-error" + "-Wno-sign-compare" + "-Wno-attributes" + "-Wno-pessimizing-move" + "-Wno-address-of-packed-member") add_subdirectory(crimson) endif() -- 2.39.5