You might consider using the new ExternalProject module and the ExternalProject_Add function to build one as a separate stand-alone project.<div><br></div><div>See this article about using ExternalProject in the latest &quot;The Source&quot; newsletter on pp. 14-17:</div>
<div><a href="http://kitware.com/products/archive/kitware_quarterly1009.pdf">http://kitware.com/products/archive/kitware_quarterly1009.pdf</a><br><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">
On Tue, Dec 8, 2009 at 12:43 PM, Alexander Neundorf <span dir="ltr">&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tuesday 08 December 2009, Rüdiger Ranft wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I need to use two different C compilers in a project, because this<br>
&gt; project consists of both PC software and micro controller firmware. Is<br>
&gt; there a way to use cmake to generate Makefiles which call different<br>
&gt; compilers, (or to hard-code a second one, since the PC software can be<br>
&gt; developed with diferent compilers, but the MC software is fixed to one<br>
&gt; special vendor-provided)?<br>
<br>
</div>In general this is not supported (since all test results in CMakeCache.txt<br>
etc. are invalid for the other compiler).<br>
But if you know what you are doing, it should be possible to just set the<br>
COMPILE-variables in the subdirectory where the sources for your<br>
microcontroller are manually to how they should look like for this compiler.<br>
try_compile() tests etc. will not work properly there.<br>
This is basically what is done in cmake/Modules/UseEcos.cmake, but this is<br>
already a few years old and today I consider this actually a hack.<br>
<br>
Alex<br>
<div><div></div><div class="h5">_______________________________________________<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></div>