From cedb010a04b8ea989926286c012dc1ad7ae38619 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 14 Feb 2018 15:05:31 +0100 Subject: [PATCH] fixed: set the boost dynamic test define if boost::unit_test_framework is a shared library additional condition for opm-parser as it forces dyn boost test (not strictly necessary but it highlights the different behaviour for now) --- cmake/Modules/OpmSatellites.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Modules/OpmSatellites.cmake b/cmake/Modules/OpmSatellites.cmake index 039b8d30c..4fdbb5f24 100644 --- a/cmake/Modules/OpmSatellites.cmake +++ b/cmake/Modules/OpmSatellites.cmake @@ -65,6 +65,11 @@ macro (opm_compile_satellites opm satellite excl_all test_regexp) set_target_properties (${_sat_NAME} PROPERTIES LINK_FLAGS "${${opm}_LINKER_FLAGS_STR}" ) + if(HAVE_DYNAMIC_BOOST_TEST AND NOT (${opm} STREQUAL "opm-parser" AND NOT BUILD_SHARED_LIBS)) + set_target_properties (${_sat_NAME} PROPERTIES + COMPILE_DEFINITIONS BOOST_TEST_DYN_LINK + ) + endif() # are we building a test? luckily, the testing framework doesn't # require anything else, so we don't have to figure out where it # should go in the library list