Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
5973b778
Commit
5973b778
authored
Feb 03, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3749 from escholtz/flatc-version
Add -v --version arg support to the flatc command.
parents
d7a86eb0
ac655b3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
flatc.cpp
src/flatc.cpp
+6
-0
No files found.
src/flatc.cpp
View file @
5973b778
...
...
@@ -19,6 +19,8 @@
#include "flatbuffers/util.h"
#include <limits>
#define FLATC_VERSION "1.2.0 (" __DATE__ ")"
static
void
Error
(
const
std
::
string
&
err
,
bool
usage
=
false
,
bool
show_exe_name
=
true
);
...
...
@@ -97,6 +99,7 @@ static void Error(const std::string &err, bool usage, bool show_exe_name) {
" -o PATH Prefix PATH to all generated files.
\n
"
" -I PATH Search for includes in the specified path.
\n
"
" -M Print make rules for generated files.
\n
"
" --version Print the version number of flatc and exit.
\n
"
" --strict-json Strict JSON: field names must be / will be quoted,
\n
"
" no trailing commas in tables/vectors.
\n
"
" --defaults-json Output fields whose value is the default when
\n
"
...
...
@@ -188,6 +191,9 @@ int main(int argc, const char *argv[]) {
schema_binary
=
true
;
}
else
if
(
arg
==
"-M"
)
{
print_make_rules
=
true
;
}
else
if
(
arg
==
"--version"
)
{
printf
(
"flatc version %s
\n
"
,
FLATC_VERSION
);
exit
(
0
);
}
else
{
for
(
size_t
i
=
0
;
i
<
num_generators
;
++
i
)
{
if
(
arg
==
generators
[
i
].
generator_opt_long
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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