On 30 Aug 2010, at 20:14, Tam Toucan wrote:

> Hi,
>   I've just started converting my projects from autotools to CMake and I've 
> hit a simple problem. I want to compile from a cygwin terminal, but using 
> mingw32 (cygwin gcc has removed the -mno-cygwin option). I'm using
> 
> SET(CMAKE_CXX_COMPILER "mingw32-g++")
> FILE(GLOB foo_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.C)
> ADD_LIBRARY(foo STATIC ${foo_SOURCES})
> 
> but that tries to compile the source at an absolute path of
> 
>   /home/Tam/src/foo.C
> 
> but mingw can't see that directory since from a windows point of view the 
> source is
> 
>    /cygwin/home/Tam/src/foo.C
> 
> how should I be doing this? I thought I'd just try it from a Windoze command 
> window (just to see if I could get it working, but I really don't want to 
> have to use it), but when I run cmake is still picks up /usr/bin/c++.exe at 
> the default and tries to compile using /home for all the paths.

To do this you need to use a version of CMake compiled in Cygwin. I'm pretty 
sure a binary package is available in the package manager.

--
Cheers,
Mike McQuaid
http://mikemcquaid.com

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to