[CMake] using cl.exe with GNU make
Michael Hufer
Michael.Hufer at swissrisk.com
Thu Apr 5 03:34:48 EDT 2007
We use cygwin, but that should be mostly the same:
-- cmd.exe (or in our case cygwin bash)
<set the variables so you can execute cl.exe from the cmd/bash shell>
$ set CC=cl.exe
$ set CXX=cl.exe
$ cmakesetup
---
in cmake setup: select build mode Unix Makefiles
and build mode (Debug or Release)
configure and create makefile(s)
---
$ cd build/dir
$ gmake install
---
Michael.
PS: For some reason a multible thread build (e.g. "gmake -j2 install") does
not work properly on Windows. It seems either gmake or the Visual Studio .NET
2003 compiler or linker is producing rubish if more than one is invoked
simultanously ;-(.
> What is the easiest way of using cl.exe with one of the GNU make based
> generators? I've tried
>
> cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=cl.exe ...
>
> but could never really get it to work.
--
Michael Hufer | EMail: mailto:Michael.Hufer at swissrisk.com
Software Developer | WWW: http://www.swissrisk.com
SWISSRISK AG | Phone: ++49 69 50952 - 0
More information about the CMake
mailing list