MantisBT - CMake
View Issue Details
0012083CMakeCMakepublic2011-04-14 06:462015-07-08 08:57
Benjamin Schindler 
Stephen Kelly 
normalminoralways
closedfixed 
Gentoo Linux
CMake 2.8.4 
CMake 3.2 
0012083: configure_file is not WARNING about ill-named parameter COPYONLY
I'm trying to copy the attached file using configure_file, but it gets corrupted.
The resulting files just has 9 bytes or so
Run
CONFIGURE_FILE(${file} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets/${file} COPY_ONLY)

on the attached file
tested on linux and windows 7 - same behaviour
No tags attached.
? Font.bmp (66,616) 2011-04-14 06:46
https://public.kitware.com/Bug/file/3816/Font.bmp
bmp

? configure_it.cmake (92) 2011-04-14 12:35
https://public.kitware.com/Bug/file/3818/configure_it.cmake
Issue History
2011-04-14 06:46Benjamin SchindlerNew Issue
2011-04-14 06:46Benjamin SchindlerFile Added: Font.bmp
2011-04-14 12:33Eric NOULARDAssigned To => Eric NOULARD
2011-04-14 12:33Eric NOULARDStatusnew => assigned
2011-04-14 12:35Eric NOULARDNote Added: 0026177
2011-04-14 12:35Eric NOULARDFile Added: configure_it.cmake
2011-04-14 12:36Eric NOULARDPriorityurgent => normal
2011-04-14 12:36Eric NOULARDSeveritymajor => minor
2011-04-14 16:30Benjamin SchindlerNote Added: 0026182
2011-04-17 15:59Eric NOULARDAssigned ToEric NOULARD =>
2011-04-17 15:59Eric NOULARDStatusassigned => backlog
2011-04-17 15:59Eric NOULARDSummaryconfigure_file destroys bmp => configure_file is not WARNING about ill-named parameter COPYONLY
2011-04-17 16:00Eric NOULARDNote Added: 0026208
2015-02-26 15:30Stephen KellyNote Added: 0038087
2015-02-26 15:30Stephen KellyStatusbacklog => resolved
2015-02-26 15:30Stephen KellyFixed in Version => CMake 3.2
2015-02-26 15:30Stephen KellyResolutionopen => fixed
2015-02-26 15:30Stephen KellyAssigned To => Stephen Kelly
2015-07-08 08:57Robert MaynardNote Added: 0039076
2015-07-08 08:57Robert MaynardStatusresolved => closed

Notes
(0026177)
Eric NOULARD   
2011-04-14 12:35   
This is due to a typo in your script:

COPY_ONLY should be
COPYONLY

The trouble is CMake is silently ignoring the misspelled option.
Try the attach cmake script using.

cmake -P configure_it.cmake
(0026182)
Benjamin Schindler   
2011-04-14 16:30   
Confirmed. This is not the first time such bugs occur to me... it would be great if cmake could be made more robust against such errors...
(0026208)
Eric NOULARD   
2011-04-17 16:00   
I am backlogging this one, unless somebody wants to work on it...
(0038087)
Stephen Kelly   
2015-02-26 15:30   
Fixed:

 http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1531df2b [^]
 configure_file: Warn about unknown arguments
(0039076)
Robert Maynard   
2015-07-08 08:57   
Closing resolved issues that have not been updated in more than 4 months.