How to build 32 bit Windows apps with ninja?

Hi,

Is it possible to use Ninja to build 32 bit apps on 64 bit windows?

When I try passing “-G Ninja -DCMAKE_GENERATOR_PLATFORM=Win32” to cmake, I get the following error:

“Ninja does not support platform specification, but platform Win32 was specified.”

If I just let cmake use the default Visual Studio generator, it works, I get a 32 bit app. Ditto if I leave out the platform, ninja produces a 64 bit app no problem.

I can live with having to use the visual studio generator for 32 bit apps, but it’s MUCH slower than Ninja so I’d like to get that going if possible. It also seems weird that Ninja even cares what the target platform is.

Note: I’m developing in CLion on 64 bit Windows if that’s relevant…

Bye!
Mark

Just run cmake in the 32 bit developer prompt and omit this cmake variable. Ninja generator always relies on the environment it runs in.