[CMake] copy_if_different on build

Skippy VonDrake skippyvondrake at gmail.com
Fri Mar 29 15:15:10 EDT 2013


I'm using:
  execute_process(COMMAND ${CMAKE_COMMAND}  -E  copy_if_different
<some-file>  <some-dest-dir>)

Should the file be copied when:
   the file has changed AND a build is executed?
   Or
   the file has changed AND CMakeLists.txt has changed AND a build is executed?

Only the 2nd method (when the CMakeLists.txt file is touched) results in the
changed file being copied.

I'd expect the 1st method to also cause a file copy.
If this assumption is wrong please tell me why.

-Skippy


More information about the CMake mailing list