From 4dc7da89ad5905b5961fa379349cbc7a82e348d4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 24 Apr 2017 17:39:58 +0200 Subject: [PATCH] tests: boost 1.64 has a print_log_value implementation fixes: error C2766: explicit specialization; 'boost::test_tools::tt_detail::print_log_value' has already been defined C:\Boost\include\boost-1_64\boost/test/tools/detail/print_helper.hpp(169): note: see previous definition of 'print_log_value --- cmake_configure.cmake | 4 ++-- tests/test_Globals.hpp | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cmake_configure.cmake b/cmake_configure.cmake index 6626c050..b8ba96f9 100644 --- a/cmake_configure.cmake +++ b/cmake_configure.cmake @@ -90,11 +90,11 @@ endif() if(TEST_COVERAGE) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - message("Test Coverage enabled. Setting CMAKE_BUILD_TYPE to Debug.") + message("TEST_COVERAGE enabled. Setting CMAKE_BUILD_TYPE to Debug.") set(CMAKE_BUILD_TYPE "Debug") endif() if(NOT BUILD_TESTS) - message("TestCoverage enabled. Enabling BUILD_TESTS.") + message("TEST_COVERAGE enabled. Enabling BUILD_TESTS.") set(BUILD_TESTS "ON") endif() target_compile_options(rw_interface diff --git a/tests/test_Globals.hpp b/tests/test_Globals.hpp index 1deb5525..c0f8bfdc 100644 --- a/tests/test_Globals.hpp +++ b/tests/test_Globals.hpp @@ -1,5 +1,5 @@ -#ifndef _TESTGLOBABLS_HPP_ -#define _TESTGLOBABLS_HPP_ +#ifndef _TESTGLOBALS_HPP_ +#define _TESTGLOBALS_HPP_ #include #include @@ -31,10 +31,11 @@ struct print_log_value { s << glm::to_string(v); } }; -} -} BOOST_NS_MAGIC_CLOSING +} +} +#if BOOST_VERSION < 106400 namespace boost { namespace test_tools { BOOST_NS_MAGIC @@ -44,9 +45,10 @@ struct print_log_value { s << "nullptr"; } }; -} -} BOOST_NS_MAGIC_CLOSING +} +} +#endif namespace boost { namespace test_tools { @@ -59,9 +61,9 @@ struct print_log_value { } } }; -} -} BOOST_NS_MAGIC_CLOSING +} +} #undef BOOST_NS_MAGIC #undef BOOST_NS_MAGIC_CLOSING