MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0011714 | CMake | CMake | public | 2011-01-17 10:31 | 2011-01-17 11:06 |
Reporter | Markus Elfring | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Platform | OS | OS Version | |||
Product Version | CMake 2.8.3 | ||||
Target Version | Fixed in Version | ||||
Summary | 0011714: Directly reading data from a file into variables | ||||
Description | I would like to read some data from a file into CMake variables. Your programming supports this kind of context-dependent data extraction with two steps so far. Example: 1. file(STRINGS ${file_name} ${variable_for_file_data} REGEX ${pattern1}) 2. string(REGEX REPLACE ${pattern2} "\\1" ${variable_for_data_element} ${variable_for_file_data}) This proccessing approach requires the evaluation of two similar regular expressions. This is not as efficient as I imagine it could be. - I do not really need any replacement features for this use case. It seems that it is only needed at the moment because the subfunction "string(REGEX REPLACE ...)" is the only one with (partly documented) support for subexpressions in regular expressions. - It would be convenient if parts from the input lines could be directly assigned to variables by the file command. Would you like to add the capability for improved data selection to a variant of the function "file(STRINGS ...)"? | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-01-17 10:31 | Markus Elfring | New Issue | |||
2011-01-17 11:06 | Brad King | Note Added: 0024756 | |||
2011-01-17 11:06 | Brad King | Status | new => closed | ||
2011-01-17 11:06 | Brad King | Assigned To | => Brad King | ||
2011-01-17 11:06 | Brad King | Resolution | open => suspended |
Notes | |||||
|
|||||
|
|