Merge pull request #334 from akva2/fix_dyn_boost_test

fixed: set the boost dynamic test define if we build shared libs
This commit is contained in:
Arne Morten Kvarving 2018-02-15 08:13:48 +01:00 committed by GitHub
commit 8ab7beb13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 5 additions and 21 deletions

View File

@ -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

View File

@ -17,7 +17,6 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE LogTests
#include <opm/common/utility/platform_dependent/disable_warnings.h>

View File

@ -18,7 +18,6 @@
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE SIMULATION_DATA_CONTAINER_TESTS
#include <boost/test/unit_test.hpp>

View File

@ -18,7 +18,6 @@
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE FLOAT_CMP_TESTS
#include <boost/test/unit_test.hpp>

View File

@ -36,11 +36,6 @@
#include "config.h"
/* --- Boost.Test boilerplate --- */
#if HAVE_DYNAMIC_BOOST_TEST
#define BOOST_TEST_DYN_LINK
#endif
#define NVERBOSE // Suppress own messages when throw()ing
#define BOOST_TEST_MODULE CubicTest

View File

@ -17,7 +17,6 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE MESSAGELIMITER_TESTS
#include <opm/common/utility/platform_dependent/disable_warnings.h>

View File

@ -19,9 +19,6 @@
*/
#include <config.h>
#if defined(HAVE_DYNAMIC_BOOST_TEST)
#define BOOST_TEST_DYN_LINK
#endif
#define NVERBOSE // to suppress our messages when throwing

View File

@ -36,9 +36,6 @@
#include <config.h>
#if HAVE_DYNAMIC_BOOST_TEST
#define BOOST_TEST_DYN_LINK
#endif
#define NVERBOSE // to suppress our messages when throwing
#define BOOST_TEST_MODULE ParameterTest

View File

@ -35,9 +35,6 @@
#include <config.h>
#if HAVE_DYNAMIC_BOOST_TEST
#define BOOST_TEST_DYN_LINK
#endif
#define NVERBOSE // to suppress our messages when throwing
#define BOOST_TEST_MODULE SparseVectorTest

View File

@ -18,9 +18,6 @@
*/
#include <config.h>
#if defined(HAVE_DYNAMIC_BOOST_TEST)
#define BOOST_TEST_DYN_LINK
#endif
#define NVERBOSE // to suppress our messages when throwing