MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013091 | CMake | CCMake | public | 2012-03-31 19:10 | 2012-09-03 16:00 |
Reporter | Christoph Anton Mitterer | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0013091: add enum like options | ||||
Description | Hi. I know this is a duplicate of bugs 0007313 and 0001527 and the (not longer existing?) #39. I also know there is no real way of implementing enums, given the way cmake works. But can't the following be done: If for any variable "foo" a variable like "foo_ALLOWED_VALUES" exist, then and UIs (like ccmake, etc.) are allowed to interpret this variable in order to restrict the possible user inputs (yes I know it will still be possible via manual editing and via the command line to set any value). For the syntax of "foo_ALLOWED_VALUES" I'd recommend a extensible format e.g.: "<type>:<type-dependent-data>" Perhaps starting with the two types: enum regexp 1) enum could be something like this: enum:value[|value]* Where value is a allowed value. 2) regexp: could be something like this: regexp:<regexp-type>:<expression> With regexp-type being for example POSIX_BRE for POSIX Basic Regular Expressions, or POSIX_ERE for POSIX Extended Regular Expressions. Maybe later one could add PCRE. expression would be the regular expression that must be matched for a value to be allowed. Why (1)? (2) would not allow for UIs to make choices (e.g. drop down lists), at least not easily. Chris. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-03-31 19:10 | Christoph Anton Mitterer | New Issue | |||
2012-03-31 21:14 | David Cole | Note Added: 0029023 | |||
2012-03-31 21:54 | Christoph Anton Mitterer | Note Added: 0029024 | |||
2012-04-09 09:03 | Brad King | Note Added: 0029096 | |||
2012-04-09 09:03 | Brad King | Status | new => resolved | ||
2012-04-09 09:03 | Brad King | Resolution | open => suspended | ||
2012-04-09 09:03 | Brad King | Assigned To | => Brad King | ||
2012-09-03 16:00 | David Cole | Note Added: 0030846 | |||
2012-09-03 16:00 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|