<div dir="ltr">Here's one possible solution (not perfect, but has been working in production for us for a while now for a similar scenario to what you describe):<div><br></div><div><a href="http://stackoverflow.com/q/36084785/1938798">http://stackoverflow.com/q/36084785/1938798</a><br></div><div><br></div><div>An alternative is a superbuild arrangement which would require a top level project to drive two sub-builds brought in via <a href="https://cmake.org/cmake/help/latest/module/ExternalProject.html">ExternalProject</a>, one for the host and the other for arm. This is both better and worse, depending on your point of view, so you may need to do some research/experimenting to see which is a better fit for your situation.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 7:29 PM, Robert Bielik <span dir="ltr"><<a href="mailto:Robert.Bielik@dirac.com" target="_blank">Robert.Bielik@dirac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I am crosscompiling a project for arm (on linux i686), and use codegeneration tools within the project (together with add_custom_command). Of course, this will fail, since the tools are compiled for arm also and thus won't execute on my host system. So the tools need to be compiled for i686 whilst the rest for arm. I'm sure this can be handled by CMake although haven't done it before so would appreciate pointers :)<br>
<br>
Regards<br>
/Robert<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/<wbr>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/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>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/<wbr>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/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div>