File: replace.cmake

package info (click to toggle)
dcmtk 3.6.9-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,648 kB
  • sloc: ansic: 426,874; cpp: 318,177; makefile: 6,401; sh: 4,341; yacc: 1,026; xml: 482; lex: 321; perl: 277
file content (4 lines) | stat: -rw-r--r-- 205 bytes parent folder | download | duplicates (3)
1
2
3
4
# read a text file, perform a regex search/replace and write it back
file(READ "${INFILE}" CONTENT)
string(REGEX REPLACE "${REGEX}" "${REPLACE}" CONTENT "${CONTENT}")
file(WRITE "${OUTFILE}" "${CONTENT}")