[CMake] How to set up Cygwin + CMake + GNU Makefiles + cl.exe correctly?

Stefan Buschmann s_buschmann at gmx.de
Fri May 30 11:22:34 EDT 2008


Hi all!

I'm trying to build my project on Windows using "GNU Makefiles" and 
cl.exe under Cygwin. I'm using CMake-2.6-patch 0 and Microsoft Visual 
Studio 2008 Professional.
I know this issue has come up every now and then, and it seems that it 
should not be too hard to set this up. However, after reading the 
mailing list and wiki entries, I'm still not able to build my project on 
Windows using Cygwin, GNU Makefiles and cl.exe.

What I did so far is:
- Installed Cygwin
- Copied alternate make.exe proposed by Bill to C:\cygwin\bin
- Created a script that sets the necessary environment variables for VC 
and invokes cmake
- Tried both cygwin-cmake and native Windows cmake

I wasn't able to get this working. Using Windows cmake, the Compiler is 
found correctly and successfully testet, and a Makefile is created. But 
it seems that inside the makefile Windows-style paths are used, so the 
compiler "C:\Programme\Microsoft Visual Studio 9.0\VC\bin\cl.exe" can't 
be invoked by make.

Using cygwin cmake, If I supply a cygwin path in CC and CXX environment 
variables, the compiler is "found" but the test program can't be 
compiled (seems to me like the opposite problem, now the VC compiler 
can't understand the submitted Unix-style options and paths). Output is 
attached below.

So, how do I set this up correctly? Shall the Windows or the cygwin 
binary of cmake be used? How do I invoke "vsvars32.bat", or do I need to 
convert those to cygwin-style paths? My test-script is attached to this 
mail. Perhaps someone could provide his setup or the scripts he uses to 
set this up?

Thanks in advance ...

Stefan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cl-setup
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080530/bbbda329/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080530/bbbda329/attachment.txt>


More information about the CMake mailing list