<div class="gmail_quote">On Fri, Dec 11, 2009 at 9:18 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 2009-12-11 at 14:51 +0100, Michael Wild wrote:<br>
> On 11. Dec, 2009, at 14:27 , Marcel Loose wrote:<br>
><br>
> > Hi all,<br>
> ><br>
> > I was browsing the CMake sources for a problem I was facing with the<br>
> > creation of symlinks (on Unix that is) and I noticed that the<br>
> > SystemTools::CreateSymlink function simply returns false when building<br>
> > on a Windows platform.<br>
> ><br>
> > Does that mean that I cannot use 'cmake -E create_symlink' on Windows.<br>
> > If that's the case I consider it a bug, because the documentation<br>
> > suggests that 'cmake -E create_symlink' provides a platform independent<br>
> > way of creating symbolic links. So, if the OS and/or filesystem does not<br>
> > support symbolic links, IMHO, it should just copy the file.<br>
> ><br>
> > Best regards,<br>
> > Marcel Loose.<br>
> ><br>
><br>
> Simply copying the file might be just as bad if people assume it really IS a symlink... IMHO, if the OS can't create a symlink, cmake -E create_symlink should fail loudly, not just silently ignore it. And somebody should implement this function for Windows >= Vista/2008 (i.e. WINVER >= 0x0600):<br>
><br>
> <a href="http://msdn.microsoft.com/en-us/library/aa363866(VS.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa363866(VS.85).aspx</a><br>
><br>
> Michael<br>
<br>
</div>Hi Michael,<br>
<br>
I think it depends. Failing loudly may not always be desirable, just as<br>
failing silently.<br>
<br>
In my particular case, I was just creating a bunch of symlinks to<br>
directories; no need to discern these symlinks from the actual<br>
directories, but I need to be able to access the directory contents.<br>
<br>
When it comes to symlinks to files, there may be situations where you<br>
would really like it to be a link, e.g. when editing the file. Would<br>
that be a CMake usage scenario??<br>
<br>
I don't know what's the best way to deal with this issue. What do the<br>
CMake developers think of this?<br></blockquote></div><br><div>I can't speak for the rest of the CMake developers, but personally, I just simply avoid symlinks at all costs in projects that are meant to be cross-platform. If I'm working on a Mac-or-Linux-only project, symlinks can sometimes be useful... but they are simply not useful on Windows.</div>
<div><br></div><div>Just my opinion,</div><div>David</div><div><br></div>