| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0013205 | CMake | (No Category) | public | 2012-05-09 16:20 | 2012-10-01 13:22 | ||||
| Reporter | Dave Abrahams | ||||||||
| Assigned To | |||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0013205: XXXConfig.cmake files should perhaps all include a function scope | ||||||||
| Description | I spent hours tracking down a bug where a variable was set in the INIT section of the file and then later used, after generated find_package calls. And now a colleague just made the same mistake again. IMO it is too error-prone to have most of that code operating at global scope. It might be better to wrap the generated code inside a function so any variable settings become local. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0029460) Dave Abrahams (reporter) 2012-05-09 16:22 |
Maybe you should close this; obviously the intent of the file is to set a bunch of global variables, so a function scope would disable that. |
|
(0031124) David Cole (manager) 2012-10-01 13:22 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2012-05-09 16:20 | Dave Abrahams | New Issue | |
| 2012-05-09 16:22 | Dave Abrahams | Note Added: 0029460 | |
| 2012-05-09 16:30 | Brad King | Status | new => resolved |
| 2012-05-09 16:30 | Brad King | Resolution | open => no change required |
| 2012-10-01 13:22 | David Cole | Note Added: 0031124 | |
| 2012-10-01 13:22 | David Cole | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |