summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FetchContent
Commit message (Collapse)AuthorAgeFilesLines
* Revert ExternalProject and FetchContent refactoringCraig Scott2021-03-098-110/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* FetchContent: Don't update timestamps if files don't changeCraig Scott2021-02-225-0/+85
| | | | | | | | | | | | | | | | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) uses a different way of writing out the step scripts and updating time stamps when steps are executed. That inadvertently always wrote out the scripts for custom commands, even when the contents didn't change. This caused their timestamp to always be updated, resulting in those steps always being seen as out-of-date and needing to be re-executed. The way timestamps were checked to determine whether to re-execute a step also did not adequately account for file systems which only have second-resolution timestamps. The IS_NEWER_THAN if condition also returns true when timestamps are the same, so one needs to use the negative form to get a true "is newer than" test. ExternalProject is not susceptible to this problem because it uses file(GENERATE) to write out the script files and that only updates the file's timestamp if the contents change. It also mostly leaves timestamp checking to the build tool.
* FetchContent: Restore patch command supportCraig Scott2021-02-173-0/+25
| | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) contained a typo which resulted in any PATCH_COMMAND being ignored. Fix the typo and add a test case that would have caught the regression.
* FetchContent: Invoke steps directly and avoid a separate sub-buildCraig Scott2021-02-042-18/+0
| | | | | | | | | | | | 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
* FetchContent: Relative SOURCE_DIR override cannot be a hard errorCraig Scott2020-12-223-0/+9
| | | Fixes: #21624
* FetchContent: Raise error if manually given source dir does not existCraig Scott2020-10-035-0/+26
| | | Fixes: #21208
* FetchContent: Fix SOURCE_DIR, BUILD_DIR when disconnected or overriddenCraig Scott2020-08-233-3/+55
| | | Fixes: #21123
* FetchContent: Preserve empty string argumentsCraig Scott2020-05-234-0/+26
| | | | Fixes: #20579
* FetchContent: Add support for SOURCE_SUBDIRCraig Scott2020-05-163-2/+17
| | | Fixes: #19875
* FetchContent: Add support for DOWNLOAD_NO_EXTRACTCraig Scott2020-04-033-0/+11
| | | Fixes: #20526
* FetchContent: Add new command FetchContent_MakeAvailable()Craig Scott2019-01-2610-0/+52
| | | Relates: #18754
* FetchContent: Give access to the terminal for download and updateCraig Scott2019-01-144-0/+24
| | | | | | | | | | | | | | | 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: Add testsCraig Scott2017-10-1617-0/+317