[CMake] CMake execute_process command on bash on Windows
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sat May 7 02:02:55 EDT 2016
On 2016-05-06 23:46+0100 Miklos Espak wrote:
> 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?
Ideally not, but you never know, there may be some generator-related
issue or even some non-generator issue in the particular CMake version
(3.3.2) that you are currently using. And it certainly sounds like a bug
if the WORKING_DIRECTORY argument is being ignored for execute_process.
To help you proceed further I suggest three debugging questions you
should be asking yourself.
1. Can you boil down the issue to a simple test case (a few-line
CMakeLists.txt file that calls execute_process) that anybody with
access to Windows MSVC and bash.exe could try out for themselves? Once
you publish that simple test case here, you might be able to get some
quick help if you are calling execute_process incorrectly.
2. What happens if you use the "NMake Makefiles" generator instead for
that simple test case? I mention that one because my impression is
(just from what I have heard from time to time on this list about many
fixes for VS generators) it might be more reliable than the VS-related
generator you are currently using.
3. What happens if you use a later version of CMake, i.e., 3.4.3 or
3.5.2 with the "NMake Makefiles" generator for that simple test case?
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
__________________________
More information about the CMake
mailing list