ENH: add the keywords OFFSET and HEX to the FILE() command, using OFFSET an

offset can be specified where the reading starts, and using HEX the data can
be converted into a hex string, so binary data can be compared with text
functions
-add docs for LIMIT, OFFSET and HEX

Alex
This commit is contained in:
Alexander Neundorf
2008-01-02 16:46:38 -05:00
parent 2625b0498b
commit 7b54af713d
2 changed files with 78 additions and 25 deletions

View File

@@ -68,7 +68,7 @@ public:
return
" file(WRITE filename \"message to write\"... )\n"
" file(APPEND filename \"message to write\"... )\n"
" file(READ filename variable [LIMIT numBytes])\n"
" file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])\n"
" file(STRINGS filename variable [LIMIT_COUNT num]\n"
" [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]\n"
" [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]\n"
@@ -93,7 +93,9 @@ public:
"because it will lead to an infinite loop. Use configure_file if you "
"want to generate input files to CMake.\n"
"READ will read the content of a file and store it into the "
"variable.\n"
"variable. It will start at the given offset and read up to numBytes. "
"If the argument HEX is given, the binary data will be converted to "
"hexadecimal representation and this will be stored in the variable.\n"
"STRINGS will parse a list of ASCII strings from a file and "
"store it in a variable. Binary data in the file are ignored. Carriage "
"return (CR) characters are ignored. It works also for Intel Hex and "