The last few weeks I'm playing with build automation. With the help of Cmake, I'm able to generate Visual Studio solution and MinGW makefile for Windows and also GCC makefile for Linux. The Cmake task is executed through a batch file on Windows respectively through a shell script on Linux. Everything looks correct and works as expected. My plan is to setup different test servers where the whole build and test process will be automated and the results will be reported somewhere.
One thing I was not able to figure out yet is how to obtain the result of the cmake command. I would like to know whether the cmake command ended successfully or not, so in case of error the fail will be reported. At this moment I'm able to parse the result and look for "Build files have been written to: ..." sentence, but I think it is not really robust solution.
Is there a way to determine whether the cmake command was successful or not? I don't want to stick necessarily to batch files, Python (or other) scripts are also welcome. Thanks.