[CMake] Install from a source directory with ExternalProject

Nicholas Braden nicholas11braden at gmail.com
Fri Feb 26 09:56:02 EST 2016


Hmm, if it were available as an FTP share you may have been able to
use a command line program via DOWNLOAD_COMMAND, but in this case I
think you really only have two options:

A. Write a small portable program compiled as part of your project,
with its task being to download that directory. Make sure the external
project DEPENDS on it and use it as the DOWNLOAD_COMMAND.

B. If the directory in question does not change often, you can
probably get away with just maintaining several file(DOWNLOAD)
statements.

Someone else may know better than me; there may be something I
overlooked. But for now, this is all I can think of.

On Fri, Feb 26, 2016 at 8:45 AM, Cedric Doucet <cedric.doucet at inria.fr> wrote:
>
> Hello Nicholas,
>
> thank you for your answer.
> Actually, it's not my own directory and I have no choice.
> I want to download source files from there :
> http://www.iro.umontreal.ca/~lecuyer/myftp/streams00/c++/
> I know how to do it with FILE(DOWNLOAD ...) but I would like to know if there is a way to do it with ExternalProject_Add.
>
> Cédric
>
>
>
> ----- Mail original -----
>> De: "Nicholas Braden" <nicholas11braden at gmail.com>
>> À: "Cedric Doucet" <cedric.doucet at inria.fr>
>> Cc: cmake at cmake.org
>> Envoyé: Vendredi 26 Février 2016 15:40:26
>> Objet: Re: [CMake] Install from a source directory with ExternalProject
>>
>> I'm not sure how you would download a directory without it being in
>> some sort of archive. If you just want to use an existing directory,
>> use the SOURCE_DIR option instead.
>>
>> On Fri, Feb 26, 2016 at 8:37 AM, Cedric Doucet <cedric.doucet at inria.fr>
>> wrote:
>> >
>> > Hello,
>> >
>> > I would like to know if it's possible to download and install an external
>> > project from a source directory instead of a tarball.
>> > I tried to do it with ExternalProject_Add function but it tries to
>> > uncompress source files and then fails.
>> >
>> > Cédric
>> >
>> > --
>> >
>> > 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
>>


More information about the CMake mailing list