[CMake] Predownload

Florent Castelli florent.castelli at gmail.com
Mon Apr 17 18:21:27 EDT 2017


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.

/Florent

On Apr 17, 2017 11:18 PM, "Craig Scott" <craig.scott at crascit.com> wrote:

> 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.
>
> On Tue, Apr 18, 2017 at 8:16 AM, Craig Scott <craig.scott at crascit.com>
> wrote:
>
>> 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.
>>
>>
>> On Tue, Apr 18, 2017 at 8:03 AM, Florent Castelli <
>> florent.castelli at gmail.com> wrote:
>>
>>> It is possible.
>>>
>>> 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.
>>>
>>
>>
>> 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.
>>
>>
>>
>> Then, you proceed on configuring Cmake to use it as usual.
>>>
>>> /Florent
>>>
>>> On Apr 17, 2017 14:11, "Zabel, Oliver" <oliverzabel at gmx.de> wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> 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.
>>>
>>>
>>>
>>> Now here is my idea and i’d like to know whether this is possible with
>>> cmake.
>>>
>>> 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.
>>>
>>> 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.
>>>
>>>
>>>
>>> Perhaps someone has a better idea to do this or even i using such a
>>> System and give me a hint?
>>>
>>>
>>>
>>> Thanks a lot!
>>>
>>>
>>>
>>> Best regards,
>>>
>>> Oliver
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Kitware offers various services to support the CMake community. For more
>>> information on each offering, please visit:
>>>
>>> CMake Support: http://cmake.org/cmake/help/support.html
>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/cmake
>>>
>>>
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Kitware offers various services to support the CMake community. For more
>>> information on each offering, please visit:
>>>
>>> CMake Support: http://cmake.org/cmake/help/support.html
>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/cmake
>>>
>>
>>
>>
>> --
>> Craig Scott
>> Melbourne, Australia
>> https://crascit.com
>>
>
>
>
> --
> Craig Scott
> Melbourne, Australia
> https://crascit.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170418/ce01ee27/attachment-0001.html>


More information about the CMake mailing list