View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013205CMake(No Category)public2012-05-09 16:202012-10-01 13:22
ReporterDave Abrahams 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0013205: XXXConfig.cmake files should perhaps all include a function scope
DescriptionI 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.
TagsNo tags attached.
Attached Files

 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.

 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


Copyright © 2000 - 2018 MantisBT Team