[CMake] CMake execute_process command on bash on Windows

Miklos Espak m.espak at ucl.ac.uk
Fri May 6 18:46:39 EDT 2016


I used the bash that is deployed with Git for Windows, and the generator
was for VS 2012, 64bit.

You mean, the behaviour of the execute_process command depends on the
generator rather then the host shell and platform?

Miklos



On 6 May 2016 at 23:30, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:

> On 2016-05-06 22:44+0100 Miklos Espak wrote:
>
> Hi,
>>
>> I want to run CMake from bash on Windows, but the configuration fails at
>> the 'execute_command' calls in our CMakeLists files. The WORKING_DIRECTORY
>> argument does not seem to make any effect. I got around it by prepending
>> "cd <working dir> ; ..." before the command to execute. But then I got
>> other problems. (The output was not stored in the output variable.)
>>
>> This was with CMake 3.3.2.
>>
>> Has anybody got experience with using CMake from bash on Windows? Has
>> anybody tried?
>>
>
> To help others here understand any issues you have encountered, I
> suggest you should indicate the source of the bash.exe that you are
> using, what kind of Windows (Cygwin, MinGW-w64/MSYS2, MinGW/MSYS,
> or bare Windows?), and what generator you are using.
>
> I have no recent first-hand experience myself, but as the guy who
> collects test reports from PLplot users I have heard lots of
> second-hand reports that our test system (based on CMake custom
> commands that run bash test scripts) works well for Cygwin,
> MinGW-w64/MSYS2, and MinGW/MSYS.  Also, one of the PLplot developers
> tried the idea of putting bash.exe (from Cygwin, IIRC) on the PATH and
> then running PLplot tests for the MSVC case, but he could not get it
> to work for reasons he could not understand. I thought at the time
> there might have been issues about the way he was manipulating the
> PATH directly from Windows so I suggested instead he run bash.exe, and
> set the PATH (and other required environment variables) from bash
> using a known file filled with export commands that he "source"d, but
> he never followed up with that experiment. So from my perspective the
> "jury is still out" on the combination of CMake, bash, and MSVC, but
> that combination should be fine on the other Windows platforms I have
> mentioned.
>
> 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:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160506/a90de8c5/attachment.html>


More information about the CMake mailing list