File: create_config.cmake

package info (click to toggle)
licq 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 18,456 kB
  • ctags: 17,529
  • sloc: cpp: 106,239; xml: 1,282; lex: 856; php: 753; perl: 616; ansic: 386; sh: 203; makefile: 81; csh: 48
file content (6 lines) | stat: -rw-r--r-- 280 bytes parent folder | download
1
2
3
4
5
6
# Read INPUT, escape quotes and generate a cpp file called OUTPUT
file(READ ${INPUT} raw)
string(REPLACE "\"" "\\\"" escaped ${raw})
string(REGEX REPLACE "\n" "\\\\n\"\n\"" quoted ${escaped})
file(WRITE ${OUTPUT}
    "extern const char* const FORWARDER_CONF =\n\"${quoted}\";\n")