-
-
Notifications
You must be signed in to change notification settings - Fork 542
Expand file tree
/
Copy pathhpx_user_main_argc_argv.cpp
More file actions
35 lines (30 loc) · 1.27 KB
/
hpx_user_main_argc_argv.cpp
File metadata and controls
35 lines (30 loc) · 1.27 KB
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
32
33
34
35
// Copyright (c) 2007-2016 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// 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)
#include <hpx/hpx_init.hpp>
#include <hpx/modules/errors.hpp>
#include <hpx/modules/runtime_local.hpp>
#include <iostream>
#include <string>
///////////////////////////////////////////////////////////////////////////////
// Forwarding of hpx_startup::user_main, if necessary. This has to be in a
// separate translation unit to ensure the linker can pick or ignore this
// function, depending on whether the main executable defines this symbol
// or not.
int hpx_startup::user_main(int /* argc */, char** /* argv */)
{
// If we have seen unknown command line options we can throw here as we
// know that the user is not going to look at the arguments.
std::string unknown_command_line =
hpx::get_config_entry("hpx.unknown_cmd_line_option", "");
if (!unknown_command_line.empty())
{
std::cerr << "hpx_startup::user_main: command line processing: "
"unknown command line option(s): '"
<< unknown_command_line << "'\n";
return -1;
}
return hpx_startup::user_main();
}