]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Don't enable BOOST_USE_VALGRIND when not requested 34097/head
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 20 Mar 2020 18:10:14 +0000 (14:10 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Sat, 21 Mar 2020 00:40:39 +0000 (20:40 -0400)
We were adding the define without support in the library if
WITH_BOOST_VALGRIND was turned off.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
cmake/modules/BuildBoost.cmake

index 900e0e539e53ecf255732bd94ad7c9e8c218037c..aa548e9ff61f73ad0d32e657408f2f9245790da7 100644 (file)
@@ -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()