[CMake] CONFIGURE_FILE with read-only template

Brad King brad.king at kitware.com
Wed Sep 29 08:56:15 EDT 2004


Dekeyser, Kris wrote:
> CMake 2.0.3, Windows XP:
>  
> I issue CONFIGURE_FILE commands using templates that sit in our 
> ClearCase source code repository, This works fine until I checked in the 
> templates. Files that are checked in are marked read-only by ClearCase. 
> On its own this does not cause a problem because CMake only needs read 
> access to the templates.
>  
> The issue is that the files in my build tree that are generated from 
> read-only templates are also marked as read-only. If CMake is run a 
> second time to update the local files, it issues a problem ("CMake 
> Error: Error in cmake code at [...]:\nCONFIGURE_FILE Problem configuring 
> file") because the target files cannot be overwritten. I noticed that 
> the project files do not get updated either.
>  
> How can we solve this?

I think the proper behavior is to copy the permissions from the source 
file but know how to write over a read-only file by deleting it first.

Please submit this as a bug report here:

http://www.cmake.org/Bug

Thanks,
-Brad


More information about the CMake mailing list