From 647819c632bad694e3c0df6428861ab43cd3ba01 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Fri, 20 Mar 2020 14:10:14 -0400 Subject: [PATCH] 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 --- cmake/modules/BuildBoost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 900e0e539e53e..aa548e9ff61f7 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() -- 2.39.5