From: Adam C. Emerson Date: Fri, 20 Mar 2020 18:10:14 +0000 (-0400) Subject: cmake: Don't enable BOOST_USE_VALGRIND when not requested X-Git-Tag: v16.0.0~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34097%2Fhead;p=ceph.git cmake: Don't enable BOOST_USE_VALGRIND when not requested We were adding the define without support in the library if WITH_BOOST_VALGRIND was turned off. Signed-off-by: Adam C. Emerson --- diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 900e0e539e53..aa548e9ff61f 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -227,7 +227,7 @@ macro(build_boost version) INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}" IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" IMPORTED_LOCATION "${Boost_${upper_c}_LIBRARY}") - if(c MATCHES "coroutine|context") + if((c MATCHES "coroutine|context") AND (WITH_BOOST_VALGRIND)) set_target_properties(Boost::${c} PROPERTIES INTERFACE_COMPILE_DEFINITIONS "BOOST_USE_VALGRIND") endif()