[CMake] How to invoke 64 bit cmd.exe from cmake script onWindows 7 (x64).

Eric Noulard eric.noulard at gmail.com
Mon Aug 23 08:30:13 EDT 2010


2010/8/23 Alexander Tarnopolsky <Alexander.Tarnopolsky at pdgm.com>:
> Thanks for prompt reply.
>
> In a simple case I invoke just interactive shell using full path to
> 64bit cmd.exe :
>
> file (TO_NATIVE_PATH "$ENV{COMSPEC}" SHELL)
> SET (ARGS /k)
> execute_process (COMMAND ${SHELL} ${ARGS})
>
> Still I see that the cmd process running as 32bit (in TaskManager).

I'm not a windows expert but since execute_process somehow
Fork/CreateThread/CreateProcess from 32 bits CMake I doubt
that this 32bits app may fork a 64bits one.

The converse should be possible because of WoW64 thing
http://en.wikipedia.org/wiki/WoW64.

May be you can try to:

1) open a 32 bits command shell
2) try to open a 64 bits command shell from the first one and see what happen

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list