Chris@16: // (C) Copyright Gennadiy Rozental 2001-2008. Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/libs/test for the library home page. Chris@16: // Chris@16: // File : $RCSfile$ Chris@16: // Chris@101: // Version : $Revision$ Chris@16: // Chris@16: // Description : Entry point for the end user into the Program Execution Monitor. Chris@16: // *************************************************************************** Chris@16: Chris@16: #ifndef BOOST_PRG_EXEC_MONITOR_HPP_071894GER Chris@16: #define BOOST_PRG_EXEC_MONITOR_HPP_071894GER Chris@16: Chris@16: #include Chris@16: Chris@16: //____________________________________________________________________________// Chris@16: Chris@16: // ************************************************************************** // Chris@16: // ************** Auto Linking ************** // Chris@16: // ************************************************************************** // Chris@16: Chris@16: // Automatically link to the correct build variant where possible. Chris@16: #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TEST_NO_LIB) && \ Chris@16: !defined(BOOST_TEST_SOURCE) && !defined(BOOST_TEST_INCLUDED) Chris@16: # define BOOST_LIB_NAME boost_prg_exec_monitor Chris@16: Chris@16: // If we're importing code from a dll, then tell auto_link.hpp about it: Chris@16: # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TEST_DYN_LINK) Chris@16: # define BOOST_DYN_LINK Chris@16: # endif Chris@16: Chris@16: # include Chris@16: Chris@16: #endif // auto-linking disabled Chris@16: Chris@16: // ************************************************************************** // Chris@16: // ************** prg_exec_monitor_main ************** // Chris@16: // ************************************************************************** // Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: int BOOST_TEST_DECL prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char* argv[] ); Chris@16: Chris@16: } Chris@16: Chris@16: #if defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN) Chris@16: Chris@16: // ************************************************************************** // Chris@16: // ************** main function for tests using dll ************** // Chris@16: // ************************************************************************** // Chris@16: Chris@16: int cpp_main( int argc, char* argv[] ); // prototype for user's cpp_main() Chris@16: Chris@16: int BOOST_TEST_CALL_DECL Chris@16: main( int argc, char* argv[] ) Chris@16: { Chris@16: return ::boost::prg_exec_monitor_main( &cpp_main, argc, argv ); Chris@16: } Chris@16: Chris@16: //____________________________________________________________________________// Chris@16: Chris@16: #endif // BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN Chris@16: Chris@16: #endif // BOOST_PRG_EXEC_MONITOR_HPP_071894GER