MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011533 | CMake | CMake | public | 2010-11-29 05:22 | 2011-06-06 18:25 | |||||
Reporter | Alexander Ivaniuk | |||||||||
Assigned To | David Cole | |||||||||
Priority | normal | Severity | block | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | PC | OS | Windows | OS Version | ||||||
Product Version | CMake 2.8.3 | |||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | |||||||
Summary | 0011533: Custom build step in MSVS 10 fails | |||||||||
Description | Custom build step that was correctly working in Visual Studio 2010 with CMake 2.8.1 fails with CMake 2.8.3. I'm using Visual Studio 10. This morning after updating CMake to version 2.8.3 from 2.8.1 found that a custom build step of our project fails with message "The system cannot find the batch label specified - VCReportError". I opened property pages for the project and found that custom build step now looks like: <command1> if errorlevel 1 goto VCReportError <command2> if errorlevel 1 goto VCReportError <command3> if errorlevel 1 goto VCReportError and really there is no label "VCReportError"! I dug into the source of CMake and found that from version CMake 2.8.2 file cmLocalVisualStudioGenerator.cxx contains the following code line:258 script += "echo Error in " + errorMsg; script += newline_text; script += "goto VCReportError"; script += newline_text; script += ")"; } return script; It looks like somebody was writing code for earlier versions of Visual Studio where AFAIN this label presents by default. So: 1) it really breaks any build on MSVS 10 with present custom build step. 2) even if the code will be modified in the following way script += newline_text; script += "goto VCReportError"; script += newline_text; script += ")"; } if( we are generating project for MSVS 10 ) { script += ":VCReportError"; script += "echo A custom buildtool returned error code"; } return script; a build still may be broken. For example, we are relying on error codes from our tools and we are outputing customized error messages. So, adding "if errorlevel 1 goto VCReportError" after each command still will hurt us. But, of course, this may be not a good style of using CMake so I'm open to new ideas. Thanks in advance :-) | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2010-11-29 05:22 | Alexander Ivaniuk | New Issue | ||||||||
2010-11-29 09:13 | David Cole | Assigned To | => David Cole | |||||||
2010-11-29 09:13 | David Cole | Status | new => assigned | |||||||
2010-12-09 10:52 | Brad King | Note Added: 0023844 | ||||||||
2010-12-09 11:41 | David Cole | Target Version | => CMake 2.8.4 | |||||||
2010-12-15 12:00 | David Cole | Relationship added | related to 0011184 | |||||||
2010-12-15 12:00 | David Cole | Note Added: 0024169 | ||||||||
2010-12-17 11:40 | David Cole | Note Added: 0024235 | ||||||||
2010-12-17 11:40 | David Cole | Status | assigned => resolved | |||||||
2010-12-17 11:40 | David Cole | Fixed in Version | => CMake 2.8.4 | |||||||
2010-12-17 11:40 | David Cole | Resolution | open => fixed | |||||||
2011-06-06 18:25 | David Cole | Status | resolved => closed | |||||||
2011-06-06 18:25 | David Cole | Note Added: 0026730 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|