@@ -20,13 +20,13 @@ public class MainCli {
2020
2121 public static void main (String [] args ) {
2222 Option typeOption = new Option ("t" , "type" , true , "Backend type: " + compilers .keySet ());
23- typeOption .setArgs ( 1 );
23+ typeOption .setRequired ( true );
2424
2525 Option outputOption = new Option ("o" , "output" , true , "Output folder" );
26- outputOption .setArgs ( 1 );
26+ outputOption .setRequired ( true );
2727
2828 Option inputOption = new Option ("i" , "input" , true , "Input folder" );
29- inputOption .setArgs ( 1 );
29+ inputOption .setRequired ( true );
3030
3131 Options options = new Options ();
3232 options .addOption (typeOption );
@@ -36,7 +36,9 @@ public static void main(String[] args) {
3636 CommandLineParser cmdLinePosixParser = new DefaultParser ();
3737 try {
3838 CommandLine commandLine = cmdLinePosixParser .parse (options , args );
39- String type = commandLine .getOptionValue (typeOption );
39+ String type = commandLine .getOptionValue (typeOption ).replace (" " , "" );
40+ System .out .println (compilers .get (type ));
41+ System .out .println ("\' " +type +"\' " );
4042 if (compilers .containsKey (type )) {
4143 IBackendCompiler backendCompiler = compilers .get (type );
4244 backendCompiler .addOptions (options );
0 commit comments