[cmake-developers] CMake: need developer help / adopt a bug

David Cole david.cole at kitware.com
Mon Aug 20 17:39:42 EDT 2012


On Mon, Aug 20, 2012 at 5:16 PM, Daniel Pfeifer <daniel at pfeifer-mail.de>wrote:

> 2012/8/20 David Cole <david.cole at kitware.com>:
> > Call for CMake developers! Please adopt one or more of these bugs if you
> > can.
> >
> > The following 11 bugs are on the CMake 2.8.10 roadmap, but they are
> > UNASSIGNED. They do not have anybody actively working on them at the
> moment.
> >
> >   ...
> >   http://public.kitware.com/Bug/view.php?id=13162
>
> Is it ok to use the Windows API to create symlinks? That would enable
> symlinks depending for what version of Windows CMake is compiled.
>
> ====
> bool SystemTools::CreateSymlink(const char* origName, const char* newName)
> {
> #if !defined(_WIN32) || defined(__CYGWIN__)
>   return symlink(origName, newName) >= 0;
> #elif (_WIN32_WINNT >= 0x0600)
>   DWORD flags =
>     SystemTools::FileIsDirectory(origName)?SYMBOLIC_LINK_FLAG_DIRECTORY:0
>   return CreateSymbolicLink(newName, origName, flags) != FALSE;
> #else
>   (void)origName;
>   (void)newName;
>   return false;
> #endif
> }
> ====
>
> cheers, Daniel
>


It's ok with me. I think that's the only reasonable way to do it.

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.

Let's just make sure to return errors when symlinks can't be created.
Hopefully with text suggesting what went wrong.


Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120820/4c9c6c89/attachment.html>


More information about the cmake-developers mailing list