[CMake] file COPY/INSTALL doesn't overwrite existing files?

Guillaume Duhamel guillaume.duhamel at gmail.com
Thu Sep 30 11:20:19 EDT 2010


Hi,

I'm trying to use "file(COPY ..." during the build of one of my project.
The documentation says that files get overwritten according to their
timestamps, but it seems they just never get overwritten.

For instance, with this CMakeLists :

===================================
project(test)
cmake_minimum_required(VERSION 2.8)
file(INSTALL dir DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(INSTALL bar.txt DESTINATION ${test_BINARY_DIR}/dir)
===================================

and those steps :

$ mkdir build && cd build && cmake .. && make
$ echo "something new" >> ../bar.txt
$ make

bar.txt doesn't get overwritten after the second make.

Is there anything I'm doing wrong or do I have to detect existing files
and remove them before the copy?

Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100930/aa378bbc/attachment.htm>


More information about the CMake mailing list