<div><div dir="auto">Had the same problem and went with #2</div></div><div dir="auto"><br></div><div dir="auto">-Caleb</div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 12, 2018 at 1:58 AM Olivier Croquette <<a href="mailto:ocroquette@free.fr">ocroquette@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
in one of our projects, we use copy_if_different to copy some DLLs <br>
required by the runtime. It's called as post-build action. The problem <br>
is that several targets want to copy the same DLLs, and when using <br>
parallelized builds, the different "cmake -E copy_if_different" can <br>
conflict, leading the whole build to fail.<br>
<br>
I see two options to fix this:<br>
<br>
1. don't use copy_if_different, but a custom tool that can deal with the <br>
concurrency<br>
<br>
2. instead of adding post-build actions to different targets, fill up a <br>
list containing all the files required, and add a single post-build <br>
action to a single target that copies all the required files in one go<br>
<br>
What do you think?<br>
<br>
Cheers<br>
Olivier<br>
<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Sent from my iPhone 4s</div>