[CMake] file(COPY) is copying even if file hasn't changed
Robert Dailey
rcdailey.lists at gmail.com
Wed Jul 19 17:04:47 EDT 2017
According to the documentation for file(COPY) [1]: "Copying preserves
input file timestamps, and optimizes out a file if it exists at the
destination with the same timestamp"
However this is not the case. My host OS is Windows 10 and I'm using
CMake 3.9.0-rc5. Each time my CMakeLists.txt is run, the file(COPY) is
copying over the file even if it didn't change. The "date modified"
timestamp for the destination file is updated. I do not want the copy
to occur if the source file has not changed (this appears to be the
intended behavior based on the documentation).
Am I understanding this correctly or is this a bug?
[1]: https://cmake.org/cmake/help/latest/command/file.html
More information about the CMake
mailing list