<div class="gmail_quote">On Mon, Aug 20, 2012 at 5:16 PM, Daniel Pfeifer <span dir="ltr"><<a href="mailto:daniel@pfeifer-mail.de" target="_blank">daniel@pfeifer-mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/8/20 David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>>:<br>
<div class="im HOEnZb">> Call for CMake developers! Please adopt one or more of these bugs if you<br>
> can.<br>
><br>
> The following 11 bugs are on the CMake 2.8.10 roadmap, but they are<br>
> UNASSIGNED. They do not have anybody actively working on them at the moment.<br>
><br>
</div><div class="HOEnZb"><div class="h5">> ...<br>
> <a href="http://public.kitware.com/Bug/view.php?id=13162" target="_blank">http://public.kitware.com/Bug/view.php?id=13162</a><br>
<br>
Is it ok to use the Windows API to create symlinks? That would enable<br>
symlinks depending for what version of Windows CMake is compiled.<br>
<br>
====<br>
bool SystemTools::CreateSymlink(const char* origName, const char* newName)<br>
{<br>
#if !defined(_WIN32) || defined(__CYGWIN__)<br>
return symlink(origName, newName) >= 0;<br>
#elif (_WIN32_WINNT >= 0x0600)<br>
DWORD flags =<br>
SystemTools::FileIsDirectory(origName)?SYMBOLIC_LINK_FLAG_DIRECTORY:0<br>
return CreateSymbolicLink(newName, origName, flags) != FALSE;<br>
#else<br>
(void)origName;<br>
(void)newName;<br>
return false;<br>
#endif<br>
}<br>
====<br>
<br>
cheers, Daniel<br>
</div></div></blockquote></div><br><div><br></div><div>It's ok with me. I think that's the only reasonable way to do it.</div><div><br></div><div>I've heard (but not tried personally, so don't know how much is just rumor) that the symlink stuff on Windows requires "admin" privilege level... so it may be less useful than folks think.</div>
<div><br></div><div>Let's just make sure to return errors when symlinks can't be created. Hopefully with text suggesting what went wrong.</div><div><br></div><div><br></div><div>Thanks,</div><div>David</div><div><br>
</div>