Loading
fastddsgen: add missing C preprocessor dependency to wrapper
fastddsgen internally calls 'cpp' (the C preprocessor) to resolve include directives, include guards, etc. See https://github.com/eProsima/Fast-DDS-Gen/blob/541129f6e7365b6b789fd2d41fa6efd94503a6b4/src/main/java/com/eprosima/fastdds/fastddsgen.java#L1423 Make 'cpp' available from the fastddsgen wrapper script. Use the unwrapped 'cpp', because the wrapped one passes additional parameters, which make the produced output incompatible with fastddsgen (string out of bounds exception). Fixes the error when using IDL files with includes: ``` Processing the file build/foo.idl... ERROR: Cannot generate the files begin -3, end 1, length 1 java.lang.StringIndexOutOfBoundsException: begin -3, end 1, length 1 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602) at java.base/java.lang.String.substring(String.java:2705) at com.eprosima.idl.context.Context.processPreprocessorLine(Context.java:955) at com.eprosima.idl.parser.grammar.IDLLexer.PREPROC_DIRECTIVE_action(IDLLexer.java:223) at com.eprosima.idl.parser.grammar.IDLLexer.action(IDLLexer.java:215) at org.antlr.v4.runtime.atn.LexerCustomAction.execute(LexerCustomAction.java:97) at org.antlr.v4.runtime.atn.LexerActionExecutor.execute(LexerActionExecutor.java:168) at org.antlr.v4.runtime.atn.LexerATNSimulator.accept(LexerATNSimulator.java:366) at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:299) at org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(LexerATNSimulator.java:230) at org.antlr.v4.runtime.atn.LexerATNSimulator.match(LexerATNSimulator.java:114) at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:141) at org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:169) at org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:152) at org.antlr.v4.runtime.BufferedTokenStream.setup(BufferedTokenStream.java:254) at org.antlr.v4.runtime.BufferedTokenStream.lazyInit(BufferedTokenStream.java:249) at org.antlr.v4.runtime.CommonTokenStream.LT(CommonTokenStream.java:92) at org.antlr.v4.runtime.Parser.enterRule(Parser.java:628) at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:304) at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:809) at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:640) at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:458) at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1581) ```