| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0003612 | CMake | CMake | public | 2006-08-15 11:40 | 2008-01-23 12:34 | ||||
| Reporter | Allen Winter | ||||||||
| Assigned To | Ken Martin | ||||||||
| Priority | low | Severity | feature | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0003612: Feature for graceful exiting | ||||||||
| Description | I wish there was a way to exit a cmake script gracefully without raising a FATAL_ERROR. Something like message(EXIT, "optional message") that doesn't scare the user with a stack trace or indicate any errors at all. Or maybe Exit(code)? where you exit with a code? | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0008567) Alex Neundorf (developer) 2007-08-21 16:27 |
What's the use case ? |
|
(0009600) Alex Neundorf (developer) 2007-11-01 06:07 |
Allen, what's the use case ? Alex |
|
(0009601) Josef Karthauser (reporter) 2007-11-01 07:26 |
It is sometimes necessary for cmake to test things and terminate if the conditions aren't met. For instance, when adding files to a project, it is possible to write macros so that a file is automatically created from a template file during the cmake process. It may be an error if the template for a given file type isn't found, which would warrant a termination with an error message. I've found that raising a MESSAGE(FATAL_ERROR "some error message") doesn't always terminate, from deep within a macro. |
|
(0010092) Alex Neundorf (developer) 2008-01-07 17:30 |
Some ideas: how about BREAK ? in a loop: terminate loop in a macro/function: "return" from that macro/function on file level: stop processing this file Alex |
|
(0010237) Ken Martin (developer) 2008-01-23 12:34 |
return and break both implemented. return effectively stops processing of the CMakeLists file at that point. So... message ("unable to find foo") return() should help address this issue |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2007-08-21 16:27 | Alex Neundorf | Note Added: 0008567 | |
| 2007-11-01 06:07 | Alex Neundorf | Note Added: 0009600 | |
| 2007-11-01 07:26 | Josef Karthauser | Note Added: 0009601 | |
| 2008-01-03 09:13 | Bill Hoffman | Assigned To | Bill Hoffman => Ken Martin |
| 2008-01-07 17:30 | Alex Neundorf | Note Added: 0010092 | |
| 2008-01-23 12:34 | Ken Martin | Status | assigned => closed |
| 2008-01-23 12:34 | Ken Martin | Note Added: 0010237 | |
| 2008-01-23 12:34 | Ken Martin | Resolution | open => fixed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |