[CMake] Install from a source directory with ExternalProject

Nicholas Braden nicholas11braden at gmail.com
Fri Feb 26 10:18:15 EST 2016


For reference, the issue isn't uncompression, it's that the link you
provided is an HTML document generated by the web server to list the
files in that directory for humans and not machines :)

On Fri, Feb 26, 2016 at 9:10 AM, Cedric Doucet <cedric.doucet at inria.fr> wrote:
>
> Thank you very much Nicholas!
> For the moment, option B sounds better for me. :)
>
> I think it could be helpful to be able to disable the uncompression step of ExternalProject_Add,
> or to control it with a variable named UNCOMPRESSION_COMMAND or something similar.
>
> Cheers,
>
> 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:56:02
>> Objet: Re: [CMake] Install from a source directory with ExternalProject
>>
>> 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