Ok I&#39;m confused as to what you mean now. I can&#39;t imagine how it&#39;d make sense to run CMake multiple times to build from one host for its own platform (save the recursive make approach, which in itself never crossed our mind AFIK, but you mentioned this is a separate issue anyway).<br><br>The suggestion was to run CMake once per compilation target, being invoked from build-script(-impl, for now). That would give us the benefit of CMAKE_SYSTEM_NAME providing the target system (as opposed to the host, as is now the case), with CMAKE_HOST_SYSTEM_NAME available when we need it. This would lead to splitting out the CMake directives in a more natural way. I also understand (maybe incorrectly) that this would keep in-code definitions like #if __APPLE__ and objc interop &quot;automatically&quot; valid without the need for hacks or further intervention from further CMake patches.<br><br>Based on what you wrote I understood that the above setup may be undesirable for OS X-&gt;iOS compilation. Now that I&#39;ve slept on it I&#39;m actually not sure why. Referring to the article you sent, each target&#39;s DAG should be atomic and independent of one another (this may well be the point where I&#39;m missing something). Also, the build output for each target is kept independent, meaning it wouldn&#39;t need to be rescanned from foreign targets&#39; CMake / ninja runs.<br><br>I&#39;m interested to hear your thoughts about this<br><br>Geordie<br><div class="gmail_quote"><div dir="ltr">Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>&gt; schrieb am Di., 19. Jan. 2016 um 02:51:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Jan 18, 2016 at 5:46 PM, Geordie Jay &lt;<a href="mailto:geojay@gmail.com" target="_blank">geojay@gmail.com</a>&gt; wrote:<br>
&gt; Hi Dimitri, thanks for the enlightening read. I&#39;ll keep those ideas in mind.<br>
&gt;<br>
&gt; By &quot;Linux native&quot; do you mean compiling eg. Linux arm from Linux x86_64 with<br>
&gt; the current scheme, and only running multiple invocations when compiling for<br>
&gt; mutually ABI-incompatible platforms (eg. osx-&gt;android)?<br>
<br>
I meant building for the platform itself.  Compiling Linux arm from<br>
Linux x86_64 would likely require the two-step approach.<br>
<br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf(&quot;%d\n&quot;,i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>&gt;*/<br>
</blockquote></div>