default_launcher.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #else
  19. #include <boost/process/v2/posix/default_launcher.hpp>
  20. #endif
  21. #endif
  22. BOOST_PROCESS_V2_BEGIN_NAMESPACE
  23. #if defined(GENERATING_DOCUMENTATION)
  24. /// The default launcher for processes.
  25. /** This launcher will be used by process if a
  26. * process is launched through the constructor:
  27. *
  28. * @code {.cpp}
  29. * process proc("test", {});
  30. * // equivalent to
  31. * process prod = default_launcher()("test", {});
  32. * @endcode
  33. *
  34. */
  35. typedef implementation_defined default_process_launcher;
  36. #else
  37. #if defined(BOOST_PROCESS_V2_WINDOWS)
  38. typedef windows::default_launcher default_process_launcher;
  39. #else
  40. #if defined(BOOST_PROCESS_V2_PDFORK)
  41. typedef posix::pdfork_launcher default_process_launcher;
  42. #else
  43. typedef posix::default_launcher default_process_launcher;
  44. #endif
  45. #endif
  46. #endif
  47. BOOST_PROCESS_V2_END_NAMESPACE
  48. #endif //BOOST_PROCESS_V2_DEFAULT_LAUNCHER_HPP