[CMake] How can I tell the ninja generator on Windows to use cl.exe?

Nico Weber thakis at chromium.org
Wed Sep 12 08:31:00 EDT 2012


On Wed, Sep 12, 2012 at 8:50 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> On 9/12/2012 6:00 AM, Nico Weber wrote:
>>
>> Hi,
>>
>> when I installed MinGW, `cmake -G Ninja` started producing ninja files
>> that use MinGW's gcc to compile source files. How can I tell cmake to
>> generate ninja files that use cl.exe instead?
>>
>> I tried searching for "cmake ninja mingw msvs" and a few related
>> terms, but I didn't find anything.
>>
> Set CC and CXX to cl in the environment before running cmake.  You will also
> of course need to be running from a shell where cl is configured to run from
> the command line.

Thanks!

Nico


More information about the CMake mailing list