[CMake] File permissions on CONFIGURE_FILE output

Aaron_Wright at selinc.com Aaron_Wright at selinc.com
Wed Feb 3 12:54:12 EST 2010


I tried your way Michael and liked the simplicity of it, however, it 
seemed that CMake configuration would have to run much more often in my 
case, because the file I want to append to the configured file is a 
source/header file and it will be modified frequently during development. 
I also didn't use the FILE(COPY) command because it didn't seem to be able 
to change permissions on a file in-place, and I didn't want to figure out 
a place to copy the file from or to that was different than where it 
already was. It was just easier to use the FILE(READ), FILE(REMOVE), 
FILE(WRITE) method suggested by Chris. 

Seems like a FILE(PERMISSIONS) command would be useful.

-------------------------------------------------------------
Aaron Wright




From:
Michael Wild <themiwi at gmail.com>
To:
Chris Hillery <chillery-cmake at lambda.nu>
Cc:
cmake at cmake.org, Aaron_Wright at selinc.com
Date:
02/03/2010 04:21 AM
Subject:
Re: [CMake] File permissions on CONFIGURE_FILE output
Sent by:
cmake-bounces at cmake.org



You're right, I could have sworn that file(COPY...) has been around for 
ages ;-)


Michael

On 3. Feb, 2010, at 12:05 , Chris Hillery wrote:

> Whoops - I take it back. I see that it IS there in the 2.8 online docs, 
as a
> separate file(<COPY|INSTALL> entry as you said. Not terribly clear IMHO, 
but
> anyway. So I guess this is a new 2.8 feature (it really truly isn't 
there in
> 2.6.4).
> 
> Ceej
> aka Chris Hillery
> 
> On Wed, Feb 3, 2010 at 3:04 AM, Chris Hillery 
<chillery-cmake at lambda.nu>wrote:
> 
>> 
>> You probably didn't grep the man-page thoroughly ;-) It is documented 
as
>>> "file(<COPY|INSTALL>"
>>> 
>> 
>> I did, actually! It ain't there on the online manual:
>> 
>> http://www.cmake.org/cmake/help/cmake2.6docs.html#command:file
>> 
>> Moreover, your script doesn't work here with CMake 2.6.4. Maybe it was
>> added in CMake 2.8? I don't have that available for testing, but it's 
not in
>> the online documentation for 2.8 either:
>> 
>> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:file
>> 
>> I'm glad it's apparently been added, but I guess it must be a very new
>> thing!
>> 
>> So, tell me - are there any other features for generically modifying 
file
>> permissions without copying the file?
>> 
>> Ceej
>> aka Chris Hillery
>> 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100203/3d8fbc98/attachment.htm>


More information about the CMake mailing list