[CMake] Overwritting read-only files when installing

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jun 17 18:23:00 EDT 2009


On Thursday 18 June 2009, you wrote:
> > I don't understand the problem.
> > When I try to install somewhere, where I'm not allowed to write the
>
> install
>
> > fails:
> > CMake Error: Error in cmake code at
> > /home/alex/src/tests/envvarininstall/cmake_install.cmake:35:
> > FILE cannot create directory: /usr/usr/local/share/foo. Maybe need
> > administrative privileges.
> >
> > Or do you mean the directory is writeable for the developer, but he
>
> doesn't
>
> > have write permission for the file ?
>
> Yes, that's what I meant. Sorry if my previous post wasn't clear enough.
>
> I want the install to fail if the file that is trying to write to is
> read-only. This is to prevent the developer from overwriting the file,
> if it's not checked out.

I think that's currently not supported, and at least on UNIX that's also not 
what that bit is supposed to say. No permission to write to a file means that 
you cannot change the file itself, but if you can write to the directory, you 
can still just go there and delete the file (and then replace it with a 
different one).

Alex


More information about the CMake mailing list