<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-10-14 19:34 GMT+02:00 Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>I have the following lines in my cmake file<br><br><br>foreach(f ${MyFiles})<br>  add_custom_command(TARGET ${OPENJPEG_PLUGIN_NAME} PRE_BUILD<br>                     COMMAND ${CMAKE_COMMAND} -E<br>                         copy ${f} $<TARGET_FILE_DIR:${MY_FOLDER}<wbr>>)<br>endforeach()<br><br></div>in order to copy MyFiles to MyFolder.<br><br><br></div>If these files already exist, I would like copy to overwrite the old file.<br></div>Is there a flag to pass to copy to force this to overwrite?<br></div></div></div></blockquote><div><br></div><div>I don't think so since the "-E copy" already has the behaviour you describe.</div><div>i.e. it will overwrite the file in any case.</div><div><br></div><div>Th only variant you have is the copy_if_different which may avoid changing</div><div>the timestamp of a file which didn't change.</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>