[CMake] EXECUTE_PROCESS too good at running programs
Brad King
brad.king at kitware.com
Fri Jul 21 13:50:18 EDT 2006
Brandon J. Van Every wrote:
> I explained the situation pretty clearly, I thought.
> E:\msys\1.0\bin\makefile does *NOT* run under a Windows command prompt.
> It's not supposed to. As I said before, there's a comment at the top of
> the binary that says it's not supposed to. Just to reiterate again in
> case there's any doubt:
>
> E:\msys\1.0\bin>dir makeinfo
> Volume in drive E is MONDRIAN
> Volume Serial Number is 9CA0-CADF
>
> Directory of E:\msys\1.0\bin
>
> 04/30/2004 11:15p 180,224 makeinfo
> 1 File(s) 180,224 bytes
> 0 Dir(s) 11,499,749,376 bytes free
>
> E:\msys\1.0\bin>cmd
> Microsoft Windows 2000 [Version 5.00.2195]
> (C) Copyright 1985-2000 Microsoft Corp.
>
> E:\msys\1.0\bin>makeinfo
> 'makeinfo' is not recognized as an internal or external command,
> operable program or batch file.
I don't think your test is reliable. My MSYS has a makeinfo.exe and it
runs under a windows shell.
Anyway, if you want to test whether a program is executable under the
build environment, you should use TRY_COMPILE with a small project with
a custom command to run the program.
-Brad
More information about the CMake
mailing list