prg_exec_monitor.hpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // (C) Copyright Gennadiy Rozental 2001-2008.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. // File : $RCSfile$
  8. //
  9. // Version : $Revision: 49312 $
  10. //
  11. // Description : Entry point for the end user into the Program Execution Monitor.
  12. // ***************************************************************************
  13. #ifndef BOOST_PRG_EXEC_MONITOR_HPP_071894GER
  14. #define BOOST_PRG_EXEC_MONITOR_HPP_071894GER
  15. #include <boost/test/detail/config.hpp>
  16. //____________________________________________________________________________//
  17. // ************************************************************************** //
  18. // ************** Auto Linking ************** //
  19. // ************************************************************************** //
  20. // Automatically link to the correct build variant where possible.
  21. #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TEST_NO_LIB) && \
  22. !defined(BOOST_TEST_SOURCE) && !defined(BOOST_TEST_INCLUDED)
  23. # define BOOST_LIB_NAME boost_prg_exec_monitor
  24. // If we're importing code from a dll, then tell auto_link.hpp about it:
  25. # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_TEST_DYN_LINK)
  26. # define BOOST_DYN_LINK
  27. # endif
  28. # include <boost/config/auto_link.hpp>
  29. #endif // auto-linking disabled
  30. // ************************************************************************** //
  31. // ************** prg_exec_monitor_main ************** //
  32. // ************************************************************************** //
  33. namespace boost {
  34. int BOOST_TEST_DECL prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char* argv[] );
  35. }
  36. #if defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
  37. // ************************************************************************** //
  38. // ************** main function for tests using dll ************** //
  39. // ************************************************************************** //
  40. int cpp_main( int argc, char* argv[] ); // prototype for user's cpp_main()
  41. int BOOST_TEST_CALL_DECL
  42. main( int argc, char* argv[] )
  43. {
  44. return ::boost::prg_exec_monitor_main( &cpp_main, argc, argv );
  45. }
  46. //____________________________________________________________________________//
  47. #endif // BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
  48. #endif // BOOST_PRG_EXEC_MONITOR_HPP_071894GER