]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CMakeLists: Use target_compile_options for seastar
authorMatan Breizman <mbreizma@redhat.com>
Mon, 30 Jun 2025 09:11:03 +0000 (09:11 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 3 Jul 2025 08:02:06 +0000 (08:02 +0000)
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 <mbreizma@redhat.com>
src/CMakeLists.txt

index b4b2c349a6a46f43c0258d5cfcbc891612c7deec..445d8f2a203dff85932d291a26b62c03d796f5f7 100644 (file)
@@ -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()