summaryrefslogtreecommitdiffstats
path: root/Modules/FetchContent.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Help: Rework docs to prioritize FetchContent_MakeAvailable()Craig Scott2021-08-231-200/+252
| | | | | | | | | | | | FetchContent_MakeAvailable() should be strongly preferred over the direct use of FetchContent_Populate(). The latter was the only method available before CMake 3.14, but the former is simpler and offers more functionality. Restructure the docs and improve the wording to steer the reader toward `FetchContent_MakeAvailable()` as the preferred approach. Also take the opportunity to pull out the variables that influence behavior into their own section. They were easily missed when buried in the docs for the FetchContent_Populate() command.
* FetchContent: Use private local variables in FetchContent_MakeAvailableArcturus Arcturus2021-05-131-15/+21
|
* Modules: Fix typos and spelling in documentationJosef Angstenberger2021-05-071-1/+1
|
* Modules: Fix typos and spelling in commentsJosef Angstenberger2021-05-071-1/+1
|
* Merge topic 'ep-fc-revert-refactoring'Brad King2021-03-101-17/+114
|\ | | | | | | | | | | | | 57d442e182 Revert ExternalProject and FetchContent refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5898
| * Revert ExternalProject and FetchContent refactoringCraig Scott2021-03-091-17/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring of the ExternalProject and FetchContent modules moved the commands into CMake scripts. This broke custom commands that used shell redirection or special build tool variables of the form $(MakeVar). Undo the sequence of commits that performed this refactoring and follow-up fixes associated with it. The following commits are reverted by this change: 4f3d1abbb4 (ExternalProject: Refactor pre-configure steps to support no-target uses, 2021-02-05) 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) bd876f3849 (FetchContent: Restore patch command support, 2021-02-18) 404cddb7bb (ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks, 2021-02-21) b0da671243 (FetchContent: Don't update timestamps if files don't change, 2021-02-18) Fixes: #21892
* | Help: Prefer commit hashes in FetchContent examples for security reasonsHarmen Stoppels2021-02-251-6/+11
| | | | | | | | Fixes: #21841 Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* | Help: Add missing MD5= for URL_HASH in FetchContent exampleCraig Scott2021-02-251-1/+1
|/ | | Fixes: #21859
* FetchContent: Invoke steps directly and avoid a separate sub-buildCraig Scott2021-02-041-114/+17
| | | | | | | | | | | | The cost of setting up and executing a separate sub-build to do the download, update and patch steps required for FetchContent population can be significant with some platforms and CMake generators. Avoid the sub-build altogether by invoking the step scripts directly. Previously, if no generator was set (e.g. population was being done in script mode), a generator needed to be available on the default PATH. Since we no longer use a sub-build, this restriction is also now gone. Fixes: #21703
* FindGit: Cache the GIT_EXECUTABLE version for the current runCraig Scott2021-01-191-0/+16
| | | | | | | | | | | The git version should not change while CMake is running. When using FetchContent with many dependencies, the repeated calls to get the git version every time ExternalProject is used can be measurable on some platforms. This commit queries that version only once and then caches it in a global property for the rest of that run. The git version can still safely change between runs because it is not cached, only the GIT_EXECUTABLE location is cached. Relates: #21703
* Merge topic 'fc-relative-SOURCE_DIR'Craig Scott2020-12-221-1/+8
|\ | | | | | | | | | | | | 51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5641
| * FetchContent: Relative SOURCE_DIR override cannot be a hard errorCraig Scott2020-12-221-1/+8
| | | | | | Fixes: #21624
* | Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-0/+7
|/ | | | Issue: #19715
* FetchContent: Raise error if manually given source dir does not existCraig Scott2020-10-031-0/+6
| | | Fixes: #21208
* FetchContent: Fix SOURCE_DIR, BUILD_DIR when disconnected or overriddenCraig Scott2020-08-231-10/+31
| | | Fixes: #21123
* Help: Add Sphinx 'versionadded' directives to each top-level documentKitware Robot2020-07-061-0/+2
| | | | | | | Run the `Utilities/Sphinx/update_versions.py` script to add initial markup to every top-level document and find module. Issue: #19715
* FetchContent: Pass through CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY if setCraig Scott2020-05-291-6/+11
| | | | | This was missed when the initial support was added in commit 0aea435aa1 (ExternalProject: Provide choice of git update strategies, 2020-02-12)
* FetchContent: Preserve empty string argumentsCraig Scott2020-05-231-21/+41
| | | | Fixes: #20579
* FetchContent: Add support for SOURCE_SUBDIRCraig Scott2020-05-161-12/+58
| | | Fixes: #19875
* FetchContent: Add support for DOWNLOAD_NO_EXTRACTCraig Scott2020-04-031-0/+22
| | | Fixes: #20526
* Help: FetchContent, ExternalProject: Command sections -> subsectionsJoachim Wuttke (o)2020-02-171-2/+5
|
* Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIRAlex Turbov2019-12-101-4/+1
| | | | | | Some modules define an intermediate global scope visible variables to access "resource" files from functions. Now these variables could be eliminated.
* FetchContent: Add new command FetchContent_MakeAvailable()Craig Scott2019-01-261-68/+206
| | | Relates: #18754
* FetchContent: Trivial doc correctionsCraig Scott2019-01-201-6/+6
|
* FetchContent: Give access to the terminal for download and updateCraig Scott2019-01-141-0/+7
| | | | | | | | | | | | | | | A main scenario where this is needed is when a git operation needs the password to a private key and asks for it on the console. Without this change, such operations can appear to hang indefinitely with no prompt if QUIET is in effect (which it is by default). Another scenario this addresses is when progress of a download or update should be shown. Without this change, all such progress is buffered with some generators and will only be shown at the end, which defeats the purpose of logging any progress to begin with. Relates: #18238
* FetchContent: Support use of the module before "project()" commandJean-Christophe Fillion-Robin2017-11-071-1/+3
| | | | | Co-authored-by: Craig Scott <craig.scott@crascit.com> Co-authored-by: Brad King <brad.king@kitware.com>
* FetchContent: New module for populating content at configure timeCraig Scott2017-10-161-0/+914