This is not easily possible without modifying the CMake C++ code. (Where it would be fairly easy to add a feature like this...) Perhaps filing a feature request for a "post generate action" would be the best thing to do.<br>
<br>However, in the meantime, you could always add a custom target that executes your stuff at the beginning of the build, and make all other top level targets depend on it with add_dependencies. Would that work in your case?<br>
<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 1:05 PM, LaViolette, Alan <span dir="ltr"><<a href="mailto:ALAVIOLETTE@overwatch.textron.com">ALAVIOLETTE@overwatch.textron.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I want to run at the end of cmake. I am generating some additional<br>
files that are more complex then configure can do. But I need the<br>
generated projects and solutions.<br>
<div><div></div><div class="h5"><br>
<br>
-----Original Message-----<br>
From: Alexander Neundorf [mailto:<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>]<br>
Sent: Wednesday, May 26, 2010 12:16 PM<br>
To: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
Cc: LaViolette, Alan<br>
Subject: Re: [CMake] Post-Generate commands<br>
<br>
On Wednesday 26 May 2010, LaViolette, Alan wrote:<br>
> Is it possible to have cmake run a command after all files are<br>
> generated? I want to do some additional build environment setup.<br>
<br>
<br>
You can use add_custom_command(TARGET your_target POST_BUILD COMMAND<br>
...) to<br>
have commands executed after a target has been built.<br>
<br>
Or do you mean at the end of the cmake run ?<br>
What do you want to do ? Please let us know some more details, otherwise<br>
it's<br>
hard to help.<br>
<br>
Alex<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>