I'm writing a simple program that parses the output from a compiler and reformats any error messages so that the IDE we use (visual studio) can parse them. We use nmake
to build, and it will call the compiler using a command line like this:
cc166.exe SOME_FLAGS_HERE MyCFile.c 2>&1 | TaskingVXToVisualReformat.exe
Now the problem is that the return code of the compiler, cc166
, is not fed back to nmake
. Only the return code of my reformatter is used which means that if I return zero from the reformat program, nmake will continue to the build instead of aborting. How can I feed back the return code from the compiler (cc166.exe
) to nmake
?
Is there any way my reformat program can read the return code of the compiler and use that when deciding its own return code? The reformatter is written in C#.