View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009537CMakeCMakepublic2009-09-15 02:272009-09-16 15:15
ReporterBen Boeckel (mathstuf) 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009537: configure_file with directory target overwrites permissions
DescriptionWhen doing something like the following (was a typo, but effects still shouldn't occur):

configure_file(version.h.in ${CMAKE_BINARY_DIR})

CMake copies the permissions of the input file to the directory. This usually involves being not-executable which effectively locks the directory without a chmod. Also, no warnings nor errors are output. CMake should do one of the following:

 * Error that the destination is not a file
 * Put the file with the same name into the directory
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0017572)
Brad King (manager)
2009-09-16 15:15

I've made a few cleanup commits, followed by the commits below. I chose the second option (put file with same name in output directory). While at it, I also made it an error to name a directory as input.

Teach configure_file to handle relative paths
/cvsroot/CMake/CMake/Source/cmConfigureFileCommand.cxx,v <-- Source/cmConfigureFileCommand.cxx
new revision: 1.36; previous revision: 1.35
/cvsroot/CMake/CMake/Source/cmConfigureFileCommand.h,v <-- Source/cmConfigureFileCommand.h
new revision: 1.26; previous revision: 1.25

Teach configure_file to handle directory names
/cvsroot/CMake/CMake/Source/cmConfigureFileCommand.cxx,v <-- Source/cmConfigureFileCommand.cxx
new revision: 1.37; previous revision: 1.36
/cvsroot/CMake/CMake/Source/cmConfigureFileCommand.h,v <-- Source/cmConfigureFileCommand.h
new revision: 1.27; previous revision: 1.26

Create CMake.ConfigureFile test for configure_file
/cvsroot/CMake/CMake/Tests/CMakeTests/CMakeLists.txt,v <-- Tests/CMakeTests/CMakeLists.txt
new revision: 1.17; previous revision: 1.16
/cvsroot/CMake/CMake/Tests/CMakeTests/ConfigureFile-BadArg.cmake,v <-- Tests/CMakeTests/ConfigureFile-BadArg.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/CMakeTests/ConfigureFile-DirInput.cmake,v <-- Tests/CMakeTests/ConfigureFile-DirInput.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/CMakeTests/ConfigureFile-DirOutput.cmake,v <-- Tests/CMakeTests/ConfigureFile-DirOutput.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/CMakeTests/ConfigureFile-Relative.cmake,v <-- Tests/CMakeTests/ConfigureFile-Relative.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Tests/CMakeTests/ConfigureFileTest.cmake.in,v <-- Tests/CMakeTests/ConfigureFileTest.cmake.in
initial revision: 1.1

 Issue History
Date Modified Username Field Change
2009-09-15 02:27 Ben Boeckel (mathstuf) New Issue
2009-09-16 12:41 Bill Hoffman Status new => assigned
2009-09-16 12:41 Bill Hoffman Assigned To => Zach Mullen
2009-09-16 12:41 Bill Hoffman Assigned To Zach Mullen => Brad King
2009-09-16 15:15 Brad King Note Added: 0017572
2009-09-16 15:15 Brad King Status assigned => closed
2009-09-16 15:15 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team