FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_io/parse_args.cpp at develop · pplab/abacus-develop · GitHub
pplab
/
abacus-develop
Public
forked from
deepmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_io
/
parse_args.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (34 loc) · 876 Bytes
Breadcrumbs
abacus-develop
/
source
/
source_io
/
parse_args.cpp
Copy path
File metadata and controls
39 lines (34 loc) · 876 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
36
37
38
39
#
include
"
parse_args.h
"
#
include
<
cstdlib
>
#
include
<
iostream
>
#
include
"
source_io/read_input.h
"
#
include
"
source_main/version.h
"
namespace
ModuleIO
{
void
parse_args
(
int
argc,
char
** argv)
{
for
(
int
i =
1
; i < argc; ++i)
//
Start from 1 to skip the program name
{
std::string arg = argv[i];
if
(arg ==
"
--version
"
|| arg ==
"
-v
"
|| arg ==
"
-V
"
)
{
#
ifdef
VERSION
const
char
* version =
VERSION
;
#
else
const
char
* version =
"
unknown
"
;
#
endif
std::cout <<
"
ABACUS version
"
<< version << std::endl;
std::exit
(
0
);
}
else
if
(arg ==
"
--check-input
"
)
{
ModuleIO::ReadInput::check_mode =
true
;
}
else
{
std::cerr <<
"
Unknown argument:
"
<< arg << std::endl;
std::exit
(
1
);
}
}
}
}
//
namespace ModuleIO
Back
|
FazBrowse Home
|
New Git URL