MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0008211 | CMake | CMake | public | 2008-12-02 12:12 | 2014-06-02 08:37 |
| Reporter | David Karr | ||||
| Assigned To | Bill Hoffman | ||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | OS | OS Version | |||
| Product Version | CMake-2-6 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0008211: cmTarget::setType uses this->Makefile before it is defined | ||||
| Description | In the function cmTarget::setType, the following lines occur: if(type == cmTarget::INSTALL_FILES || type == cmTarget::INSTALL_PROGRAMS || type == cmTarget::INSTALL_DIRECTORY) { this->Makefile-> IssueMessage(cmake::INTERNAL_ERROR, "SetType called on cmTarget for INSTALL_FILES, " "INSTALL_PROGRAMS, or INSTALL_DIRECTORY "); return; } But in the three places where cmTarget::setType is called, it is called on a newly-created cmTarget whose Makefile has not yet been set. This can be confirmed by recompiling CMake with the following lines inserted at the start of the body of cmTarget::setType std::cerr << name << " makefile " << (this->Makefile ? "OK" : "DOES NOT EXIST") << std::endl; type = cmTarget::INSTALL_FILES; This simulates the occurrence of an internal error elsewhere in CMake. When the modified copy of CMake is used to generate a typical Visual Studio 9 "solution", it crashes immediately after printing out the text indicating that the makefile "does not exist". This problem would be masked in normal operation, because the internal error should not occur. But if the internal error ever DID occur, the error messaging code would be useless. Calling cmTarget::setMakefile before cmTarget::setType does not appear to be a valid resolution of this error, since that function requires the cmTarget type to be set already. Passing the makefile as an additional argument to cmTarget::setType may be a viable option. | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2008-12-02 12:12 | David Karr | New Issue | |||
| 2008-12-02 12:26 | Bill Hoffman | Status | new => assigned | ||
| 2008-12-02 12:26 | Bill Hoffman | Assigned To | => Brad King | ||
| 2008-12-02 12:40 | Brad King | Note Added: 0014270 | |||
| 2008-12-02 12:40 | Brad King | Assigned To | Brad King => Bill Hoffman | ||
| 2013-11-02 10:13 | Stephen Kelly | Note Added: 0034321 | |||
| 2013-11-02 10:13 | Stephen Kelly | Status | assigned => resolved | ||
| 2013-11-02 10:13 | Stephen Kelly | Resolution | open => fixed | ||
| 2014-06-02 08:37 | Robert Maynard | Note Added: 0035985 | |||
| 2014-06-02 08:37 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||