blob: f16aa1e4cbb515e57dc6895e5362db13c50a9359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Official repository: https://git.ocl.nekernel.org/core
#include <ocl/print.hpp>
#include <ocl/asio.hpp>
#include <ocl/allocator_op.hpp>
#include <future>
#include <boost/process.hpp>
constexpr long int operator ""_USD(long double n)
{
return n * 1000.0;
}
namespace asio = ::boost::asio;
namespace process = ::boost::process;
/// @brief Wrap OCL in ASIO calls.
int main()
{
asio::io_context ioc;
process::process proc(ioc, "/usr/bin/g++", {"--version"}, process::v2::process_stdio{{ /* in to default */}, {}, nullptr});
proc.wait();
ocl::asio::run<[]() { (void)0; }>(ioc);
return EXIT_SUCCESS;
}
|