[cmake-developers] execute_process on windows uses CreateProcess

Mathieu Westphal mathieu.westphal at kitware.com
Wed Apr 4 03:30:49 EDT 2018


Hello CMake developpers.

We are using execute_process in some of our tests for a Qt based
application (ParaView)
However, on windows, the GUI does not show up and that caused some problems
for rendering.

We have investigated the problem, and it looks like execute_process on
windows is based on CreateProcess [1], But CreateProcess cannot interact
directly with the user desktop as a GUI would need.
It has to do with permissions and system environnement, see the relevant
discussions [2], [3] and [4].

So here is my question :
Is there a way, using cmake, to start a gui command on windows and have the
gui shows up ?
If not, is this intended ? Could we have this feature ?

Thanks for any hindsight !

 Best,

Mathieu Westphal

[1] :
https://github.com/Kitware/KWStyle/blob/c541ae8f81d7ca739b3c03138d430cb3f41ed1c6/Utilities/KWSys/ProcessWin32.c#L1844

[2] :
https://social.msdn.microsoft.com/Forums/vstudio/en-US/24cd0f16-c5c7-4574-ac27-8e785bdf6bad/createprocess-creates-the-new-process-but-the-gui-is-not-displayed?forum=vcgeneral

[3] :
https://stackoverflow.com/questions/948417/how-to-launch-a-gui-program-in-a-windows-service?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

[4] :
https://stackoverflow.com/questions/267838/how-can-a-windows-service-execute-a-gui-application
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20180404/a2dcc975/attachment.html>


More information about the cmake-developers mailing list