MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0008906 | CMake | CMake | public | 2009-04-20 05:46 | 2016-06-10 14:30 |
| Reporter | Hugo Heden | ||||
| Assigned To | Bill Hoffman | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | CMake-2-6 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0008906: A failure in add_custom_command/POST_BUILD does not propagate to target | ||||
| Description | Possible bug in "Visual Studio 9 2008" generator? Consider the following CMakeLists.txt code. This little "project" should fail when the target MyTarget is built (because one of the POST_BUILD custom commands fails). =========================== cmake_minimum_required(VERSION 2.6) PROJECT( test ) ADD_CUSTOM_TARGET( MyTarget COMMENT "This is MyTarget" ) ADD_CUSTOM_COMMAND( TARGET MyTarget POST_BUILD COMMAND cmake -E blablablahh # Error (intentional error, to illustrate buggy behaviour.) VERBATIM ) ADD_CUSTOM_COMMAND( TARGET MyTarget POST_BUILD COMMAND cmake -E echo "hello there" # Success. VERBATIM ) ============================= However, running > cmake -G "Visual Studio 9 2008" ..\source > devenv test.sln /Build Debug /Project MyTarget.vcproj succeeds, which is not expected. (Right?). When using other Generators and build tools (I have tested with "NMake Makefiles" -- nmake on Windows and "Unix Makefiles" -- Gnu-make on Linux) the build phase fails as expected. > cmake --version cmake version 2.6-patch 2 | ||||
| Steps To Reproduce | |||||
| Additional Information | The problem seems to be that a succeeding custom command comes after the failing one, and this sort of *hides* the failure somehow.. Rationale for suggesting Severity = Major: The fact that failures are "hidden" like this is of course dangerous. We have unit tests that have been failing for a while that have not shown up as errors in our nightly builds because of this bug.. ouch! | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2009-04-20 05:46 | Hugo Heden | New Issue | |||
| 2009-09-14 13:11 | Bill Hoffman | Note Added: 0017444 | |||
| 2009-09-14 13:11 | Bill Hoffman | Status | new => assigned | ||
| 2009-09-14 13:11 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
| 2009-09-14 17:52 | Hugo Heden | Note Added: 0017493 | |||
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041545 | |||
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||