[CMake] howto re-run file(COPY signature ?

Dominique Belhachemi domibel at cs.tu-berlin.de
Tue Nov 23 22:44:38 EST 2010


Hello,

I am using the following command in my CMakeLists.txt file to copy a
directory with all sub-directories from the source tree to a directory
in the binary tree.

file(COPY ${SRCDIR}
  DESTINATION ${CMAKE_BINARY_DIR}/${DSTDIR}/
  PATTERN .svn EXCLUDE
)

After adding this line to CMakeLists.txt and typing 'make' the command
is working like expected. But after adding a new file to ${SRCDIR} and
typing 'make' again, the new file doesn't get copied. I have to do a
'touch CMakeLists.txt' first.

Is there a way to enforce the execution?

Thanks
Dominique



More information about the CMake mailing list