1exec_program
2------------
3
4.. deprecated:: 3.0
5
6  Use the :command:`execute_process` command instead.
7
8Run an executable program during the processing of the CMakeList.txt
9file.
10
11::
12
13  exec_program(Executable [directory in which to run]
14               [ARGS <arguments to executable>]
15               [OUTPUT_VARIABLE <var>]
16               [RETURN_VALUE <var>])
17
18The executable is run in the optionally specified directory.  The
19executable can include arguments if it is double quoted, but it is
20better to use the optional ``ARGS`` argument to specify arguments to the
21program.  This is because cmake will then be able to escape spaces in
22the executable path.  An optional argument ``OUTPUT_VARIABLE`` specifies a
23variable in which to store the output.  To capture the return value of
24the execution, provide a ``RETURN_VALUE``.  If ``OUTPUT_VARIABLE`` is
25specified, then no output will go to the stdout/stderr of the console
26running cmake.
27