[CMake] Out-of-source builds

Phil Smith phil at voltage.com
Tue Sep 30 10:06:54 EDT 2008


I am using cygwin make. I'm not bent on using c:\whatever, but cygdrive didn't work at the cmake level. What am I missing?

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
Sent: Tuesday, September 30, 2008 9:57 AM
To: Phil Smith
Cc: CMake
Subject: Re: [CMake] Out-of-source builds

Phil Smith wrote:
> It seems that an out-of-source build must be part of the same
directory structure (this is Windows).
>
> To whit:
>
> - Source is under c:\svn\Toolkit\IBMport\vtk-core - If I'm in
> c:\svn\Toolkit\IBMport\, I can cmake just fine - If I'm in c:\temp\,
> cmake with fully qualified toolchain and path
(c:\svn\Toolkit\IBMport\) works, but then make fails because some of the
targets have "c:" prefixed and that irritates make
> - If I'm in c:\temp\, cmake withOUT fully qualified toolchain and/or
path fails, trying to (for some reason) append svn\Toolkit\IBMport\ as a
relative path onto c:\temp\, even though the toolchain/path passed has a
leading backslash.
>
> Is this a bug? Or necessary/deliberate behavior? The last case at
least seems wrong offhand.
>
> I tinkered with /cygdrive/c/etc. but couldn't get that to work
> either. --

If you want /cygdrive, then use the native cygwin cmake.  If you want
mixed dos style paths, you have to use the patched gmake.   Cygwin
removed support for c: in paths.  Next version of gmake will put the
support back.

You can find a patched make here:

http://www.cmake.org/files/cygwin/make.exe

-Bill


More information about the CMake mailing list