File: run_stringify.cmake

package info (click to toggle)
mwrap 1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,548 kB
  • sloc: cpp: 3,315; python: 1,850; ansic: 856; makefile: 258; lex: 233; sh: 145
file content (22 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if(NOT DEFINED STRINGIFY)
  message(FATAL_ERROR "STRINGIFY executable location is required")
endif()
if(NOT DEFINED INPUT)
  message(FATAL_ERROR "INPUT file is required")
endif()
if(NOT DEFINED OUTPUT)
  message(FATAL_ERROR "OUTPUT file is required")
endif()
if(NOT DEFINED NAME)
  message(FATAL_ERROR "String symbol NAME is required")
endif()

execute_process(
  COMMAND "${STRINGIFY}" "${NAME}"
  INPUT_FILE "${INPUT}"
  OUTPUT_FILE "${OUTPUT}"
  RESULT_VARIABLE _stringify_result
)
if(NOT _stringify_result EQUAL 0)
  message(FATAL_ERROR "stringify failed with exit code ${_stringify_result}")
endif()