Commit 0b59ced2 authored by Jean Meurice's avatar Jean Meurice

Added CMake generation flag

parent 9630bb2c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment