[CMake] ExternalProject & .exe

Pau Garcia i Quiles pgquiles at elpauer.org
Sun May 5 18:29:39 EDT 2013


Hello,

I am having trouble with ExternalProject_Add when downloading a .exe. Lines
1308-1310 in ExternalProject.cmake seem to be the problem:

        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
          message(FATAL_ERROR "Could not extract tarball filename from
url:\n  ${url}")
        endif()

I guess the logic behind allowing only tar, bzip, gzip and zip files is
those are the formats libarchive understands, isn't it? But what if I want
to download a self-extracting .exe on Windows and use CONFIGURE_COMMAND to
trigger the self-extraction? As that seems flaky to detect from libarchive,
what about adding a new EXTRACT_COMMAND and not checking the extension of
the downloaded file if EXTRACT_COMMAND is present? (if the answer is "we
like it", I'll move forward and implement it)

Also, how do I get the name of the downloaded file from my CMakeLists.txt?
DOWNLOAD_NAME seems to be the only alternative and I don't really like it
:-?

Thank you

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130506/5285ec95/attachment.htm>


More information about the CMake mailing list