[CMake] Visual Studio: build a 32 bit application under windows 64 bits

Mourad Boufarguine mourad at boufarguine.name
Fri Nov 4 08:24:43 EDT 2011


On Fri, Nov 4, 2011 at 8:37 AM,  <ycollette.nospam at free.fr> wrote:
> Hello,
>
> I've got a big project using cmake.
> Several applications are build as native 64 bits applications, but I need to build one application as a 32 bit application.
> cmake is run from the Visual Studio 64 console.
>
> Is it possible to force a 32 compilation using cmake ?
>
> Best regards,
>
> YC
> --
>

Hi,

You are looking for the -G switch. exemple for VS 2010 :

cmake -G"Visual Studio 10" => 32bit
cmake -G"Visual Studio 10 Win64" => 64bit

Look into cmake documentation for the generator names of other VS versions.

Cheers,
Mourad


More information about the CMake mailing list