On Mon, 2010-10-25 at 16:54 +0200, Michael Wild wrote: > On 25. Oct, 2010, at 16:45 , Marcel Loose wrote: > > > Hi all, > > > > I noticed that 'ctest -DExperimentalBuild' returns with an exit status > > 0, even if compiler errors occur. I think that is caused by the fact > > that 'make -i' is used. The "-i|--ignore-errors" option causes make to > > always exit with status 0. > > > > Wouldn't it make more sense to use 'make -k' instead? > > The "-k|--keep-going" option tries to build as much as possible, but > > won't try to build targets that depend on sources that failed to > > compile. Furthermore, and more importantly, 'make -k' will return with > > an exit status unequal to 0, if compiler errors occurred. > > > > Best regards, > > Marcel Loose. > > Some weeks ago I also wanted to propose this, but then realized one important drawback of -k: Say, you have target B depending on A. If A fails, nothing from B will be compiled, thus hiding programming errors that will only show up once A is fixed. What needs to be fixed is the error parser in CTest. > > Michael > > -- > There is always a well-known solution to every human problem -- neat, plausible, and wrong. > H. L. Mencken >
Hi Michael, I always thought that 'make -k' would try to build as much as possible. That's also my interpretation from the info pages. Here's the first part of the third paragraph of Section 9.6 of the make info page: On these occasions, you should use the `-k' or `--keep-going' flag. This tells `make' to continue to consider the other prerequisites of the pending targets, remaking them if necessary, before it gives up and returns nonzero status. The way I read this, is that 'make' will try to (re)build as much as possible of the remaining targets, after an error occurred. Could it be that nothing of your target B gets (re)built, because CMake somehow introduces too many dependent targets? Best regards, Marcel Loose. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake