Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Cpp
Commits
0b59ced2
Commit
0b59ced2
authored
Apr 18, 2019
by
Jean Meurice
Browse files
Added CMake generation flag
parent
9630bb2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/generator/cpp/GeneratorCppCli.java
View file @
0b59ced2
...
...
@@ -129,10 +129,18 @@ public final class GeneratorCppCli {
.
required
(
false
)
.
build
();
public
static
final
Option
OPTION_FLAG_CMAKE
=
Option
.
builder
()
.
longOpt
(
"flag-generate-cmake"
)
.
desc
(
"optional flag indicating if a CMake project should be generated to build the model"
)
.
hasArg
(
false
)
.
required
(
false
)
.
build
();
private
GeneratorCppCli
()
{
}
public
static
void
main
(
String
[]
args
)
{
Log
.
initDEBUG
();
Options
options
=
getOptions
();
CommandLineParser
parser
=
new
DefaultParser
();
CommandLine
cliArgs
=
parseArgs
(
options
,
parser
,
args
);
...
...
@@ -154,6 +162,7 @@ public final class GeneratorCppCli {
options
.
addOption
(
OPTION_FLAG_ALGEBRAIC
);
options
.
addOption
(
OPTION_FLAG_THREADING
);
options
.
addOption
(
OPTION_FLAG_EXEC_LOGGING
);
options
.
addOption
(
OPTION_FLAG_CMAKE
);
return
options
;
}
...
...
@@ -194,6 +203,8 @@ public final class GeneratorCppCli {
g
.
setUseThreadingOptimization
(
cliArgs
.
hasOption
(
OPTION_FLAG_THREADING
.
getLongOpt
()));
g
.
setExecutionLoggingActive
(
cliArgs
.
hasOption
(
OPTION_FLAG_EXEC_LOGGING
.
getLongOpt
()));
g
.
setGenerateCMake
(
cliArgs
.
hasOption
(
OPTION_FLAG_CMAKE
.
getLongOpt
()));
try
{
if
(
componentSymbol
!=
null
)
{
g
.
generateFiles
(
componentSymbol
,
symTab
);
...
...
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