default_launcher.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // boost/process/v2/default_launcher.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2022 Klemens D. Morgenstern (klemens dot morgenstern at gmx dot net)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_PROCESS_V2_DEFAULT_LAUNCHER_HPP
  11. #define BOOST_PROCESS_V2_DEFAULT_LAUNCHER_HPP
  12. #include <boost/process/v2/detail/config.hpp>
  13. #if defined(BOOST_PROCESS_V2_WINDOWS)
  14. #include <boost/process/v2/windows/default_launcher.hpp>
  15. #else
  16. #if defined(BOOST_PROCESS_V2_PDFORK)
  17. #include <boost/process/v2/posix/pdfork_launcher.hpp>
  18. #elif defined(BOOST_PROCESS_V2_PIPEFORK)
  19. #include <boost/process/v2/posix/pipe_fork_launcher.hpp>
  20. #else
  21. #include <boost/process/v2/posix/default_launcher.hpp>
  22. #endif
  23. #endif
  24. BOOST_PROCESS_V2_BEGIN_NAMESPACE
  25. #if defined(GENERATING_DOCUMENTATION)
  26. /// The default launcher for processes.
  27. /** This launcher will be used by process if a
  28. * process is launched through the constructor:
  29. *
  30. * @code {.cpp}
  31. * process proc("test", {});
  32. * // equivalent to
  33. * process prod = default_launcher()("test", {});
  34. * @endcode
  35. *
  36. */
  37. typedef implementation_defined default_process_launcher;
  38. #else
  39. #if defined(BOOST_PROCESS_V2_WINDOWS)
  40. typedef windows::default_launcher default_process_launcher;
  41. #else
  42. #if defined(BOOST_PROCESS_V2_PDFORK)
  43. typedef posix::pdfork_launcher default_process_launcher;
  44. #elif defined(BOOST_PROCESS_V2_PIPEFORK)
  45. typedef posix::pipe_fork_launcher default_process_launcher;
  46. #else
  47. typedef posix::default_launcher default_process_launcher;
  48. #endif
  49. #endif
  50. #endif
  51. BOOST_PROCESS_V2_END_NAMESPACE
  52. #endif //BOOST_PROCESS_V2_DEFAULT_LAUNCHER_HPP