[CMake] Parallel Processes in CMake
Tobias Becker
becker.tobi at gmail.com
Tue Dec 16 10:22:08 EST 2014
Hi
I Implemented support for parallel processes based on bash xor powershell.
If you have long running processes in CMake you might want to check it out
and try it at http://thetoeb.de/2014/12/16/parallel-processes-cmake/ resp.
https://github.com/toeb/oo-cmake
the gist ist:
```
# these to processes run concurrently
start_process(COMMAND ping cmake.org)
ans(handle1)
start_process(COMMAND ping github.org)
ans(handle2)
set(handles ${handle1} ${handle2})
## waits until all processes are terminated
process_wait_all(${handles})
## prints the standard output stream of both processes to the console
foreach(handle ${handles}
process_stdout(${handle})
ans(stdout)
message(STATUS "${stdout})
endforeach()
```
Tell me if you like it (or if you don't want me to shamelessly plug my Blog
posts on this mailing list) :)
Cheers!
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141216/ac7eed8c/attachment.html>
More information about the CMake
mailing list