<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,  thanks a lot for your input. I will take a look at the SuperProject (with ExternalProject_Add() call) constellation as well as the meta build tools. I'm quite new to this stuff, so please allow me my question: does this even make sense what i'm trying or are there some "patterns" that handles this stuff that i'm not aware of? </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 18. April 2017 um 00:23 Uhr<br/>
<b>Von:</b> "Craig Scott" <craig.scott@crascit.com><br/>
<b>An:</b> "Florent Castelli" <florent.castelli@gmail.com><br/>
<b>Cc:</b> CMake <cmake@cmake.org>, "Zabel, Oliver" <oliverzabel@gmx.de><br/>
<b>Betreff:</b> Re: [CMake] Predownload</div>

<div name="quoted-content">
<div>The top level build doesn't actually need to build anything itself. It would just become a sequence of ExternalProject_Add() calls with some simple logic for selecting which things to turn on/off, etc. The first ExternalProject_Add() would download the toolchain files. The subsequent ExternalProject_Add() calls could then use those toolchain files in their configure steps. You just need to ensure you create the dependencies between the ExternalProject targets to ensure the toolchain downloads happen before the other ExternalProject targets that need them.
<div> </div>
</div>

<div class="gmail_extra"> 
<div class="gmail_quote">On Tue, Apr 18, 2017 at 8:21 AM, Florent Castelli <span><<a href="mailto:florent.castelli@gmail.com" onclick="parent.window.location.href='florent.castelli@gmail.com'; return false;" target="_blank">florent.castelli@gmail.com</a>></span> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>Don't you need the toolchain to be configured (Aka project() called) before ExternalProject? You wouldn't be able to update it after the download. 
<div> </div>

<div><span class="HOEnZb"><font color="#888888">/Florent </font></span></div>
</div>

<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"> 
<div class="gmail_quote">On Apr 17, 2017 11:18 PM, "Craig Scott" <<a href="mailto:craig.scott@crascit.com" onclick="parent.window.location.href='craig.scott@crascit.com'; return false;" target="_blank">craig.scott@crascit.com</a>> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>Actually, ExternalProject could even be used to download and unpack the toolchain files in a superbuild arrangement too. Probably makes more sense now that I think about it, since it provides unpacking as well, not just downloading and has a much richer set of download methods.</div>

<div class="gmail_extra"> 
<div class="gmail_quote">On Tue, Apr 18, 2017 at 8:16 AM, Craig Scott <span><<a href="mailto:craig.scott@crascit.com" onclick="parent.window.location.href='craig.scott@crascit.com'; return false;" target="_blank">craig.scott@crascit.com</a>></span> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>One option may be a superbuild arrangement (based on ExternalProject, online searches should give you details). The only thing the top level would do is setup the sub builds, including downloading and selecting which toolchain(s) to use for each sub build.
<div class="gmail_extra"> </div>

<div class="gmail_extra"> 
<div class="gmail_quote"><span>On Tue, Apr 18, 2017 at 8:03 AM, Florent Castelli <span><<a href="mailto:florent.castelli@gmail.com" onclick="parent.window.location.href='florent.castelli@gmail.com'; return false;" target="_blank">florent.castelli@gmail.com</a>></span> wrote:</span>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left-width: 1.0px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1.0ex;">
<div><span>It is possible. </span>

<div> 
<div><span>Nothing prevents you from calling execute_process to download as extract your toolchain file when it is run. You probably want to check the destination folder for a pre existing download though. </span></div>
</div>
</div>
</blockquote>

<div> </div>

<div> </div>

<div>If you use file(DOWNLOAD...) for downloading the toolchain files and you specify an EXPECTED_HASH, this will also conveniently take care of only downloading the file if it isn't already present. Shouldn't need to resort to execute_process() to do the download.</div>

<div>
<div class="m_-1275897993815336411m_-7053339928680453940h5">
<div> </div>

<div> </div>

<div> </div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left-width: 1.0px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div>
<div>Then, you proceed on configuring Cmake to use it as usual. </div>

<div> </div>

<div>/Florent </div>
</div>
</div>

<div class="gmail_extra"> 
<div class="gmail_quote">On Apr 17, 2017 14:11, "Zabel, Oliver" <<a href="mailto:oliverzabel@gmx.de" onclick="parent.window.location.href='oliverzabel@gmx.de'; return false;" target="_blank">oliverzabel@gmx.de</a>> wrote:

<blockquote class="m_-1275897993815336411m_-7053339928680453940m_697351338112605920gmail-m_5486751031586579908quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left-width: 1.0px;border-left-style: solid;border-left-color: rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div class="m_-1275897993815336411m_-7053339928680453940m_697351338112605920gmail-m_5486751031586579908m_-418025734051953634WordSection1">
<p class="MsoNormal">Hi,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">i’m developing Software for embedded Systems and my applications Need to run on different target platforms. Until now we are build our Code with make but i’d like to Switch to cmake. ATM we’re putting our Compiler toolchains in our VCS to be able to produce the same binarys even after years. Until now, there is only one toolchain include in a Project as svn-external/git submodule. But i want to use toolchain-files with cmake.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Now here is my idea and i’d like to know whether this is possible with cmake.</p>

<p class="MsoNormal">I have my Project root and in this Folder i’d like to have different toolchain files for different Compilers. I’d like to exclude the Compilers as external.</p>

<p class="MsoNormal">Now i’d like to build the cmake Cache by calling cmake with the required toolchain file. Is it now somehow possible, to download the required toolchain before the Cache is buidl up? If this would be possible, i could dynamicly choose which toolchain i want to have – would be great for Compiler / unit Tests as well.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Perhaps someone has a better idea to do this or even i using such a System and give me a hint?</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thanks a lot!</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Best regards,</p>

<p class="MsoNormal">Oliver</p>
</div>
</div>
<br/>
--<br/>
<br/>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.cmake.org/Wiki/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" target="_blank">http://cmake.org/cmake/help/support.html</a><br/>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br/>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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/>
Follow this link to subscribe/unsubscribe:<br/>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></blockquote>
</div>
</div>
<br/>
--<br/>
<br/>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.cmake.org/Wiki/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" target="_blank">http://cmake.org/cmake/help/support.html</a><br/>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br/>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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/>
Follow this link to subscribe/unsubscribe:<br/>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></blockquote>
</div>
</div>
</div>
 

<div> </div>
<span class="m_-1275897993815336411m_-7053339928680453940HOEnZb"><font color="#888888">-- </font></span>

<div class="m_-1275897993815336411m_-7053339928680453940m_697351338112605920gmail_signature">
<div>
<div>
<div>
<div>
<div><span class="m_-1275897993815336411m_-7053339928680453940HOEnZb"><font color="#888888">Craig Scott</font></span>

<div><span class="m_-1275897993815336411m_-7053339928680453940HOEnZb"><font color="#888888">Melbourne, Australia</font></span></div>

<div><span class="m_-1275897993815336411m_-7053339928680453940HOEnZb"><font color="#888888"><a href="https://crascit.com" target="_blank">https://crascit.com</a></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<span class="m_-1275897993815336411m_-7053339928680453940HOEnZb"><font color="#888888"> </font></span></div>
</div>
</blockquote>
</div>
 

<div> </div>
--

<div class="m_-1275897993815336411m_-7053339928680453940gmail_signature">
<div>
<div>
<div>
<div>
<div>Craig Scott
<div>Melbourne, Australia</div>

<div><a href="https://crascit.com" target="_blank">https://crascit.com</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
 

<div> </div>
--

<div class="gmail_signature">
<div>
<div>
<div>
<div>
<div>Craig Scott
<div>Melbourne, Australia</div>

<div><a href="https://crascit.com" target="_blank">https://crascit.com</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>