[cmake-developers] Is the "cmake_policy (VERSION 3.11)" statement in the latest UseSWIG.cmake correct?

2018-04-04 Thread Alan W. Irwin

According to
, an
important side effect of "cmake_policy (VERSION 3.11)" is that no user
with cmake version less than 3.11.0 can use the latest version of
UseSWIG.cmake.

Was that change intended (i.e., does the latest version of
UseSWIG.cmake use policies AND CMake logic that is only available for
3.11.0 and higher)? If so, fair enough.  But if not (i.e., the latest
version of UseSWIG.cmake would work fine for earlier versions of
CMake) I suggest you adjust the above VERSION 3.11 to the actual
minimum version of CMake that will work with this module to advertise
what range of older versions of CMake can use it as a replacement for
the buggy official UseSWIG.cmake that they would otherwise be using.

This reason this issue has come up for me is that I had to copy the
3.9.1 UseSWIG.cmake module to PLplot to give our users that use older
versions of CMake such as 3.6.2 access to an important bug fix in that
version. And that copy has worked fine for us ever since for those
using, e.g., cmake version 3.6.2.  So as a result I became interested
in the official further development of UseSWIG.cmake module after
3.9.1 in case there were any further bug fixes that would be important
to our users.  And that investigation left me wondering whether that
"cmake_policy (VERSION 3.11)" statement actually states the correct
minimum version of cmake that would work with this module.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] execute_process on windows uses CreateProcess

2018-04-04 Thread Brad King
On 04/04/2018 03:30 AM, Mathieu Westphal wrote:
> Is there a way, using cmake, to start a gui command on windows
> and have the gui shows up ?

```
execute_process(COMMAND cmd /c notepad)
```

> If not, is this intended?

Yes.  Otherwise console windows appear for everything.

CreateProcessW is *the* way to create a process on Windows.
It has flags to control whether a window is shown, and we
intentionally set them to not show the window.

> Could we have this feature ?

The `cmd /c` workaround should be sufficient, but it wouldn't be
hard to add an option to the execute_process command to allow
the window to be shown.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] execute_process on windows uses CreateProcess

2018-04-04 Thread Mathieu Westphal
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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers