File: RunProgram.cmake

package info (click to toggle)
mlpack 4.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 32,064 kB
  • sloc: cpp: 233,202; python: 1,940; sh: 1,201; lisp: 414; makefile: 85
file content (13 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# RunProgram.cmake: a CMake script that actually runs the given program to
# generate a file, which is output into the given directory.
#
# This script depends on the following arguments:
#
#   PROGRAM: the program to run to.
#   OUTPUT_FILE: the file to store the output in.
execute_process(COMMAND ${PROGRAM} ${PROGRAM_OPT1} ${PROGRAM_OPT2} OUTPUT_FILE ${OUTPUT_FILE}
    ERROR_VARIABLE err)

if (err)
  message(FATAL_ERROR "Fatal error running ${PROGRAM}: ${err}!")
endif ()