MantisBT - CMake
View Issue Details
0011368CMakeCTestpublic2010-10-27 07:332016-06-10 14:31
Marcel Loose 
Kitware Robot 
normalminoralways
closedmoved 
CMake 2.8.3 
 
0011368: Let CTest return with an error status when compiler errors occur
Currently, a command like 'ctest -D ExperimentalBuild' returns with exit status 0, even if compiler errors occurred. This is IMO caused by the fact that 'make -i' is used to build the code. See http://www.mail-archive.com/cmake@cmake.org/msg32294.html [^] for a discussion on this issue.

I would like ctest to return with a non-zero exit status when compiler errors have occurred. It would really help in situations where, e.g., 'ctest -D ExperimentalBuild' is used in a script.
No tags attached.
Issue History
2010-10-27 07:33Marcel LooseNew Issue
2010-10-27 07:40Michael WildNote Added: 0022715
2010-11-10 11:47David ColeProduct VersionCMake-2-8 => CMake 2.8.3
2010-11-10 11:47David ColeTarget Version => CMake 2.8.4
2010-11-10 11:47David ColeStatusnew => assigned
2010-11-10 11:47David ColeAssigned To => David Cole
2010-12-08 16:12David ColeNote Added: 0023821
2011-01-10 14:51David ColeNote Added: 0024551
2011-01-10 14:51David ColeTarget VersionCMake 2.8.4 =>
2011-10-25 22:54David ColeAssigned ToDavid Cole =>
2011-10-25 22:54David ColeStatusassigned => backlog
2014-06-04 18:05Andras LassoNote Added: 0036119
2015-03-21 19:27Utkarsh AyachitNote Added: 0038272
2016-01-29 05:11dolfimNote Added: 0040354
2016-06-10 14:28Kitware RobotNote Added: 0041758
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0022715)
Michael Wild   
2010-10-27 07:40   
As I already said on the mailing list I would like to keep "make -i" for various reasons.

Also, there seems to be an issue with the error parser which fails to detect any compiler errors. If that was fixed, CTest could exit with a non-zero return value even if the build process did.
(0023821)
David Cole   
2010-12-08 16:12   
To preserve existing behavior, running ctest with -D or -S should do what's it been doing by default. We could, however, add a "--propagate-tool-errors" (or something with a better name!) command line flag to ctest that would change the behavior in this way.
(0024551)
David Cole   
2011-01-10 14:51   
Not enough time to get a fix for this into CMake 2.8.4 -- deferring until later.
(0036119)
Andras Lasso   
2014-06-04 18:05   
Any chance that this will be fixed?
Is there any workaround to prevent starting of testing if the build failed?
(0038272)
Utkarsh Ayachit   
2015-03-21 19:27   
Ping! Can we prioritize this one please?
(0040354)
dolfim   
2016-01-29 05:11   
+1 for this.
(0041758)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.