File: RunProgram.cmake

package info (click to toggle)
mlpack 4.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,272 kB
  • sloc: cpp: 226,039; python: 1,934; sh: 1,198; lisp: 414; makefile: 85
file content (13 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (2)
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 ()