The execute_process command will spawn one or more child processes from within the currently executing CMake process, thus providing a powerful and convenient way of running arbitrary commands when configuring your project. It is possible to execute more than one command within one invocation of execute_process. Notice, however, that the output of each command will be piped into the next. The command accepts a number of arguments:
- WORKING_DIRECTORY lets you specify in which directory the commands should be executed.
- RESULT_VARIABLE will contain the result of running the processes. This is either an integer to signal successful execution or a string with the error condition incurred.
- OUTPUT_VARIABLE and ERROR_VARIABLE will contain ...