DuneExecuteProcess

Wrapper around execute_process() with optional error and warning handling.

dune_execute_process

Run execute_process() and optionally stop or warn on non-zero exit status.

dune_execute_process(
  [ERROR_MESSAGE <message>]
  [WARNING_MESSAGE <message>]
  [WORKING_DIRECTORY <dir>]
  [RESULT_VARIABLE <var>]
  [OUTPUT_VARIABLE <var>]
  [ERROR_VARIABLE <var>]
  COMMAND <command> [<args>...]
)
ERROR_MESSAGE

Fatal error message emitted when the command exits with non-zero status.

WARNING_MESSAGE

Warning message emitted when the command exits with non-zero status.

WORKING_DIRECTORY

Working directory for the spawned process. The default is ${CMAKE_CURRENT_BINARY_DIR}.

RESULT_VARIABLE

Variable receiving the command exit status.

OUTPUT_VARIABLE

Variable receiving standard output.

ERROR_VARIABLE

Variable receiving standard error.

If neither ERROR_MESSAGE nor WARNING_MESSAGE is given, the command behaves like a thin forwarding wrapper around execute_process().