Ok I'm confused as to what you mean now. I can't imagine how it'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 "automatically" 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->iOS compilation. Now that I've slept on it I'm actually not sure why. Referring to the article you sent, each target's DAG should be atomic and independent of one another (this may well be the point where I'm missing something). Also, the build output for each target is kept independent, meaning it wouldn't need to be rescanned from foreign targets' CMake / ninja runs.<br><br>I'm interested to hear your thoughts about this<br><br>Geordie<br><div class="gmail_quote"><div dir="ltr">Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> 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 <<a href="mailto:geojay@gmail.com" target="_blank">geojay@gmail.com</a>> wrote:<br>
> Hi Dimitri, thanks for the enlightening read. I'll keep those ideas in mind.<br>
><br>
> By "Linux native" do you mean compiling eg. Linux arm from Linux x86_64 with<br>
> the current scheme, and only running multiple invocations when compiling for<br>
> mutually ABI-incompatible platforms (eg. osx->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<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>>*/<br>
</blockquote></div>