Skip to content

Commit d9314c5

Browse files
committed
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 <[email protected]>
1 parent 6c1f4c6 commit d9314c5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -471,22 +471,22 @@ if(WITH_CRIMSON)
471471
build_dpdk(${CMAKE_BINARY_DIR}/src/dpdk)
472472
endif()
473473
endif()
474-
list(APPEND Seastar_CXX_FLAGS
475-
"-DSEASTAR_NO_EXCEPTION_HACK"
476-
"-Wno-error"
477-
"-Wno-sign-compare"
478-
"-Wno-attributes"
479-
"-Wno-pessimizing-move"
480-
"-Wno-address-of-packed-member"
481-
"-Wno-non-virtual-dtor")
482-
set(Seastar_CXX_FLAGS "${Seastar_CXX_FLAGS}" CACHE STRING "" FORCE)
483474
add_subdirectory(seastar)
484475
# create the directory so cmake won't complain when looking at the imported
485476
# target: Seastar exports this directory created at build-time
486477
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/include")
487478
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/src")
488-
# required by any target that links to seastar
489-
target_compile_options(seastar PUBLIC "-Wno-non-virtual-dtor")
479+
target_compile_options(seastar
480+
PUBLIC
481+
# required by any target that links to seastar
482+
"-Wno-non-virtual-dtor"
483+
PRIVATE
484+
"-DSEASTAR_NO_EXCEPTION_HACK"
485+
"-Wno-error"
486+
"-Wno-sign-compare"
487+
"-Wno-attributes"
488+
"-Wno-pessimizing-move"
489+
"-Wno-address-of-packed-member")
490490
add_subdirectory(crimson)
491491
endif()
492492

0 commit comments

Comments
 (0)