[CMake] execute_process seems to execute in parallel and also only shows output of last command

Nils Gladitz nilsgladitz at gmail.com
Thu Mar 24 09:28:21 EDT 2016


On 03/24/2016 12:58 PM, xyzdragon at fastmail.fm wrote:
> The CMake 3.5.0 documentation specifies the execute_process command like
> this:
>
>      execute_process(COMMAND <cmd1> [args1...]]
>                      [COMMAND <cmd2> [args2...] [...]]
>                      [WORKING_DIRECTORY <directory>]
>                      [...] )
>
> This mail here clarifies that all commands should be run sequentially:
> https://cmake.org/pipermail/cmake/2009-June/030158.html

TLDR; what that mail states is that add_custom_command/add_custom_target 
COMMANDs run in sequence.
You use neither of those.

As stated by the quote  from the execute_process() documentation it runs 
the commands in parallel by design so that each process's output can be 
fed to the next process's input.

Nils


More information about the CMake mailing list