From 0d6e58d9fd0d2e8d79190106feb576efae43a932 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 18 Sep 2016 12:22:48 +0100 Subject: [PATCH] Write out some compiler info before test results. --- test/helpers/test.hpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/helpers/test.hpp b/test/helpers/test.hpp index dea6e0ea..b9d4c3b5 100644 --- a/test/helpers/test.hpp +++ b/test/helpers/test.hpp @@ -24,7 +24,11 @@ void BOOST_PP_CAT(x, _type)::run() \ #define RUN_TESTS() int main(int, char**) \ - { ::test::test_list::run_tests(); return boost::report_errors(); } \ + { \ + ::test::write_compiler_info(); \ + ::test::test_list::run_tests(); \ + return boost::report_errors(); \ + } namespace test { struct registered_test_base { @@ -66,6 +70,21 @@ namespace test { } } } + + inline void write_compiler_info() { +#if defined(BOOST_GCC_CXX11) + char const* cpp11 = "true"; +#else + char const* cpp11 = "false"; +#endif + + std::cout + << "Compiler: " << BOOST_COMPILER << "\n" + << "Library: " << BOOST_STDLIB << "\n" + << "C++11: " << cpp11 << "\n" + << "\n" + << std::flush; + } } #include