MantisBT - CMake
View Issue Details
0015653CMakeCMakepublic2015-07-15 13:272016-06-10 14:31
James Bigler 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0015653: add PERMISSIONS flag to file(GENERATE)
We can set executable permissions with file(WRITE|COPY), but we can't do so with file(GENERATE). It would be helpful when generating scripts to be able to set the permissions, otherwise we can't use file(GENERATE).
No tags attached.
Issue History
2015-07-15 13:27James BiglerNew Issue
2015-07-15 13:34Brad KingNote Added: 0039146
2015-07-15 13:37James BiglerNote Added: 0039147
2015-07-15 13:46Brad KingNote Added: 0039151
2015-07-15 14:09James BiglerNote Added: 0039152
2016-06-10 14:29Kitware RobotNote Added: 0042809
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039146)
Brad King   
2015-07-15 13:34   
Since CMake 3.2 file(GENERATE) uses permissions of the input file if one is used:

 file(GENERATE): Use permissions of input file if present.
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81afbbc0 [^]

This makes it useful for scripts.
(0039147)
James Bigler   
2015-07-15 13:37   
That's fine if I don't want parts of the script to be configured with values of CMake variables (e.g. ${CMAKE_CURRENT_BINARY_DIR}). Is it possible to use generator expressions that access CMake variables?
(0039151)
Brad King   
2015-07-15 13:46   
Re 0015653:0039147: Use configure_file() to evaluate the CMake variables into a temporary file and then use that as the input to file(GENERATE). This should get you going for now.

Having explicit permissions options is a worthwhile proposal.
(0039152)
James Bigler   
2015-07-15 14:09   
Probably worth adding to file(WRITE) as well for symmetry.
(0042809)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.