[CMake] Using mingw from cygwin terminal (/cygwin directory problems)
Tam Toucan
dr at tamtoucan.com
Mon Aug 30 15:14:51 EDT 2010
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.
Cheers.
More information about the CMake
mailing list