[CMake] generating GNU makefiles for MSVC

Alexander Neundorf a.neundorf-work at gmx.net
Wed Mar 5 18:07:09 EST 2008


On Thursday 06 March 2008, Randal Walser wrote:
> Can anyone tell me how I can use cmake to generate GNU makefiles which
> invoke the MSVC compiler?  The Cygwin version of cmake seems to insist
> on gcc.  Likewise, when I specify "Unix Makefiles" to CMakeSetup, it
> resets the compiler to gcc after I've set it to cl.  Perhaps I'm
> overlooking something, but I don't see anything that specifically
> addresses this in the online cmake documentation.

Set the CC and CXX environment variables to cl, and install a GNU make for 
windows, best one is IMO the one you get here: 
http://unxutils.sourceforge.net/

Alex


More information about the CMake mailing list