Chris@102: // boost/detail/lightweight_test_reporter.hpp ----------------------------------------// Chris@102: Chris@102: // Copyright Beman Dawes 2014 Chris@102: Chris@102: // Distributed under the Boost Software License, Version 1.0. Chris@102: // See http://www.boost.org/LICENSE_1_0.txt Chris@102: Chris@102: //--------------------------------------------------------------------------------------// Chris@102: // // Chris@102: // Configuration reporting cpp_main() // Chris@102: // // Chris@102: // Displays configuration information, then returns test_main(argc, argv), which // Chris@102: // must be supplied by the user. // Chris@102: // // Chris@102: // Note: cpp_main(argc, argv) is called from a try block in main(), which is // Chris@102: // supplied by as is a catch block that reports // Chris@102: // std::exception what(). // Chris@102: // // Chris@102: //--------------------------------------------------------------------------------------// Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: int test_main(int argc, char* argv[]); Chris@102: Chris@102: int cpp_main(int argc, char* argv[]) Chris@102: { Chris@102: std::cout << BOOST_COMPILER Chris@102: #ifdef __GNUC__ Chris@102: << ", __GXX_EXPERIMENTAL_CXX0X__ " Chris@102: # ifdef __GXX_EXPERIMENTAL_CXX0X__ Chris@102: "defined" Chris@102: # else Chris@102: "not defined" Chris@102: # endif Chris@102: #endif Chris@102: << "\n" Chris@102: << BOOST_STDLIB << "\n" Chris@102: << BOOST_PLATFORM << "\n" Chris@102: << "Boost version " << BOOST_VERSION / 100000 << '.' Chris@102: << BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << "\n"; Chris@102: Chris@102: std::cout << "Command line: "; Chris@102: for (int a = 0; a < argc; ++a) Chris@102: { Chris@102: std::cout << argv[a]; Chris@102: if (a != argc - 1) Chris@102: std::cout << ' '; Chris@102: } Chris@102: std::cout << std::endl; Chris@102: Chris@102: return test_main(argc, argv); Chris@102: }