View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015653CMakeCMakepublic2015-07-15 13:272016-06-10 14:31
ReporterJames Bigler 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015653: add PERMISSIONS flag to file(GENERATE)
DescriptionWe 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).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039146)
Brad King (manager)
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 (developer)
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 (manager)
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 (developer)
2015-07-15 14:09

Probably worth adding to file(WRITE) as well for symmetry.
(0042809)
Kitware Robot (administrator)
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.

 Issue History
Date Modified Username Field Change
2015-07-15 13:27 James Bigler New Issue
2015-07-15 13:34 Brad King Note Added: 0039146
2015-07-15 13:37 James Bigler Note Added: 0039147
2015-07-15 13:46 Brad King Note Added: 0039151
2015-07-15 14:09 James Bigler Note Added: 0039152
2016-06-10 14:29 Kitware Robot Note Added: 0042809
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team