Author Topic: Postprocess compiler's output  (Read 1086 times)

Offline teto

  • Almost regular
  • **
  • Posts: 127
Postprocess compiler's output
« on: July 02, 2015, 04:57:47 pm »

The build system of the program I use copies all headers in a specific read-only directory. Thus when codeblocks parses gcc output (to display warnings/errors) and I click on those erros, it opens those headers I can't modify. I would like to call an extern script that parses each line of gcc/clang's output
Code: [Select]
sed -r 's#(.*)./ns3/(.[^.]*\.h)#echo -n  "$(find src/ -name \2)"#ge'

I found in the compiler advanced options how to add rules to parse the compiler output but I don't think these rules can call a script  ?

So far I use a custom compilation rule (i.e. a script) that writes gcc's output to a file, parse this file with the previous command and return the result to codeblocks. It works but I see the output only at the end of the compilation which is suboptimal.