aboutsummaryrefslogtreecommitdiff
path: root/third-party/cmake/DownloadAndExtractFile.cmake
Commit message (Collapse)AuthorAge
* build: rename build-related dirsJustin M. Keyes2022-06-28
| | | | | | | | | | | | | | Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/)
* build(cmake): skip download if target file exists #14844)comicfans2021-07-08
|
* build: DownloadAndExtractFile.cmake: retry status_code=7 #11582Daniel Hahler2019-12-21
| | | | | Retry downloads with "Couldn't connect to server" errors. Ref: https://lgtm.com/projects/g/neovim/neovim/logs/rev/pr-ca2f193a91f02881deb637f18694818bda49a7ed/lang:cpp/stage:Build%20master_026ba804d173c41ab99ee270c93f7975c1d6d713
* third-party: download: retry (#10599)Daniel Hahler2019-07-24
| | | | | | | | | | | | | | | | | | | | | | This is meant to handle the common case of failing to download libtermkey: FAILED: cd /home/travis/build/neovim/neovim/deps-downloads/libtermkey && /usr/local/cmake-3.12.4/bin/cmake -DPREFIX=/home/travis/nvim-deps/build -DDOWNLOAD_DIR=/home/travis/build/neovim/neovim/deps-downloads/libtermkey -DURL=http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz -DEXPECTED_SHA256=cecbf737f35d18f433c8d7864f63c0f878af41f8bd0255a3ebb16010dc044d5f -DTARGET=libtermkey -DUSE_EXISTING_SRC_DIR=OFF -P /home/travis/build/neovim/neovim/third-party/cmake/DownloadAndExtractFile.cmake && /usr/local/cmake-3.12.4/bin/cmake -E touch /home/travis/nvim-deps/build/src/libtermkey-stamp/libtermkey-download -- file: /home/travis/build/neovim/neovim/deps-downloads/libtermkey/libtermkey-0.21.1.tar.gz -- downloading... src='http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz' dst='/home/travis/build/neovim/neovim/deps-downloads/libtermkey/libtermkey-0.21.1.tar.gz' timeout='none' CMake Error at /home/travis/build/neovim/neovim/third-party/cmake/DownloadAndExtractFile.cmake:77 (message): error: downloading 'http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz' failed status_code: 6 status_string: "Couldn't resolve host name" log: Curl_ipv4_resolve_r failed for www.leonerd.org.uk Couldn't resolve host 'www.leonerd.org.uk' Closing connection 0 Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
* build: bundle: clean binary dir with new downloads (#10411)Daniel Hahler2019-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required to (re)build e.g. libluv when the version changes (which triggers a new download). With `make deps`, changing the `LUV_URL`/`LUV_SHA256`, and `make deps` again: Before: > Up-to-date: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a After: > Installing: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a See with https://github.com/neovim/neovim/pull/10358 - where .deps contained libluv 1.29, the merge updates it to 1.30, but then it failed to link because `libluv.a` is considered to be up-to-date (after downloading the new version). Note that header files get installed, since they have the original time stamp, but `libluv.a` is being generated (does not use the timestamp from the archive here, but needs to get rebuild). It could be argued that the build system of the included project should catch/handle this, but it seems to be good practice to clean the binary / build dir with a new download to start from scratch. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19452 Also fixes cmake/BuildLuv / luv-static: use name with -DTARGET for download command, and pass (shared) `SRC_DIR` explicitly instead.
* build: avoid cmake warning (#6417)Justin M. Keyes2017-04-01
|
* CMake: Don't use existing third-party sources by default.Florian Walch2015-09-09
| | | | | | | | Introduce ALLOW_EXISTING_SRC_DIR option, turned off by default. The Homebrew formula, which downloads and extracts the third-party dependency sources before starting the build, would turn this option ON.
* Switch to SHA256 for third-party bundles downloadingXu Cheng2015-03-06
| | | | Closes #2107
* build: allow SKIP or skip to be used as the SHA1John Szakmeister2015-02-09
| | | | This will skip hash checking, just like the all zeros hash.
* build: split hash checking from the download stepJohn Szakmeister2015-02-09
| | | | | | | | | | | | | | It turns out that `file(DOWNLOAD ...)` is not very user friendly with it's error message, and only supports MD5 on v2.8.10 of CMake (the default for Ubuntu 12.04). If CMake is built without SSL support, users are left hanging with a message that the hashes don't match. It turns out that `file(SHA1 ...)` exists in v2.8.10, and we can use that to compute the hash ourselves. So this splits the hash checking into a separate step, where we can provide some additional advice if the SHA1 is the hash for an empty file. Additionally, it also allows us to drop the MD5 hashes and maintain only SHA1 hashes for our dependencies.
* build: allow skipping of the hash check in the download stepJohn Szakmeister2014-11-25
| | | | | | This is useful when trying to bisect an issue in a dependency, and we want to pull from a specific commit but don't want to have to download and determine the sha1sum and md5sum of the tarball.
* build: don't download and extract tarball if source is already presentXu Cheng2014-11-08
| | | | | | | When building under Homebrew, we want to let Homebrew manage downloading and extracting the tarballs. See PR #1411. Also make sure to skip only if directory is not empty. Fix #1433.
* Revert "build: don't download and extract tarball if source is already present"John Szakmeister2014-11-08
| | | | | | This reverts commit 90658982644b76a9e8e4abfbcd16450df26b0a32. It failed to work correctly on a fresh clone. See #1433.
* Merge pull request #1411 from xu-cheng/homebrew-formulaJohn Szakmeister2014-11-07
|\ | | | | Let homebrew handle external resources download
| * build: don't download and extract tarball if source is already presentXu Cheng2014-11-07
| | | | | | | | | | When building under Homebrew, we want to let Homebrew manage downloading and extracting the tarballs.
* | Prefer to SHA1 other than MD5 in third-party downloadsXu Cheng2014-11-07
|/ | | | If CMake version is less than 2.8.11, fallback to MD5
* Workaround the broken progress feedback in some versions of CMake.John Szakmeister2014-03-21
Underneath the hood, CMake uses libcurl and libcurl has had a number of issues regarding progress feedback. In one sample run against Travis CI, we ended up with nearly 3,000 lines of progress output for a single download. Unfortunately, CMake doesn't have the download and extract steps separate, so we have some extra work that we have to do. Much of the content was taken from the ExternalProject.cmake and it's template for generating the content of the download and extract CMake files.