From 254a6744e4e5decd4c59137e9753b0ad95c18b7e Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Wed, 4 May 2016 22:53:06 -0500 Subject: [PATCH] Fixed boost.log benchmark build. --- bench/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt index d3506081..628507ab 100644 --- a/bench/CMakeLists.txt +++ b/bench/CMakeLists.txt @@ -32,7 +32,7 @@ function(add_benchmark _target) ) if(_benchmark_DEFINITIONS) - target_compile_definitions(${_target} ${_benchmark_DEFINITIONS}) + target_compile_definitions(${_target} PUBLIC ${_benchmark_DEFINITIONS}) endif() add_test(NAME test_benchmark_${_target} COMMAND ${_target}) @@ -50,8 +50,9 @@ endif() find_package(Boost QUIET COMPONENTS log) if(Boost_FOUND) - add_benchmark(boost-bench LIBS ${Boost_LIBRARIES} INCLUDES ${Boost_INCLUDE_DIRS}) - add_benchmark(boost-bench-mt LIBS ${Boost_LIBRARIES} INCLUDES ${Boost_INCLUDE_DIRS}) + set(BOOST_DEFS "-DBOOST_LOG_DYN_LINK=1") + add_benchmark(boost-bench LIBS ${Boost_LIBRARIES} INCLUDES ${Boost_INCLUDE_DIRS} DEFINITIONS ${BOOST_DEFS}) + add_benchmark(boost-bench-mt LIBS ${Boost_LIBRARIES} INCLUDES ${Boost_INCLUDE_DIRS} DEFINITIONS ${BOOST_DEFS}) endif() find_package(glog QUIET)