Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PI2
PI2 View
Commits
21ee17de
Commit
21ee17de
authored
Jan 09, 2019
by
Martin Kröning
🦀
Browse files
Fix program path in help
parent
dc0043dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
pi2-demo/meson.build
View file @
21ee17de
...
...
@@ -13,6 +13,6 @@ pi2_demo_src = files(
boost_po_dep
=
dependency
(
'boost'
,
modules
:
[
'program_options'
])
executable
(
'pi2-demo'
,
pi2_demo_src
,
include_directories
:
pi2_demo_inc
,
dependencies
:
[
pi2_view_dep
,
boost_po_dep
],
dependencies
:
[
pi2_view_dep
,
boost_po_dep
,
microsoft_gsl_dep
],
install
:
true
)
pi2-demo/src/main.cpp
View file @
21ee17de
...
...
@@ -2,6 +2,8 @@
#include
<boost/program_options.hpp>
#include
<chrono>
#include
<fstream>
#include
<gsl/span>
#include
<gsl/string_span>
#include
<iostream>
#include
<ratio>
#include
<string>
...
...
@@ -9,6 +11,8 @@
namespace
po
=
boost
::
program_options
;
int
main
(
int
argc
,
char
*
argv
[])
{
auto
args
=
gsl
::
make_span
(
argv
,
argc
);
try
{
std
::
string
durationString
;
double
timescale
;
...
...
@@ -45,10 +49,11 @@ int main(int argc, char *argv[]) {
po
::
notify
(
variablesMap
);
if
(
variablesMap
.
count
(
"help"
)
>
0
)
{
std
::
cout
<<
"Usage: ./pi2-demo/pi2-demo [OPTION]... [FILE]
\n
"
"Parses and simulates FILE according to the PI-2 of the RWTH.
\n\n
"
<<
visibleOptions
<<
std
::
endl
;
std
::
cout
<<
"Usage: "
+
std
::
string
(
args
.
at
(
0
))
+
" [OPTION]... [FILE]
\n
"
"Parses and simulates FILE according to the PI-2 of the "
"RWTH.
\n\n
"
<<
visibleOptions
<<
std
::
endl
;
return
1
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment