]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/rgw: forward spawn's compile options to rgw_common object library 39279/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 3 Feb 2021 20:17:19 +0000 (15:17 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 3 Feb 2021 20:28:07 +0000 (15:28 -0500)
since rgw_common is an OBJECT library, we can't use
target_link_libraries() for its dependency on spawn. we add its
include directories manually already with
$<TARGET_PROPERTY:spawn,INTERFACE_INCLUDE_DIRECTORIES>, but this didn't
pull in the compile definitions. this ultimately prevented the
WITH_BOOST_VALGRIND option from passing the BOOST_USE_VALGRIND
definition attached to boost::context

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/CMakeLists.txt

index 12b42e4077f5af7a2cc35e39c2a7402dfb8ca8d8..2de15201b5f81af0a53040e1e5663d1005b261ef 100644 (file)
@@ -182,6 +182,8 @@ target_include_directories(rgw_common PRIVATE "${LUA_INCLUDE_DIR}")
 
 target_include_directories(rgw_common PRIVATE
   $<TARGET_PROPERTY:spawn,INTERFACE_INCLUDE_DIRECTORIES>)
+target_compile_definitions(rgw_common PRIVATE
+  $<TARGET_PROPERTY:spawn,INTERFACE_COMPILE_DEFINITIONS>)
 
 if(WITH_LTTNG)
   # rgw/rgw_op.cc includes "tracing/rgw_op.h"