| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mkdir, download, update and patch steps are used by
FetchContent during the configure phase of the main build. Because
these steps need a target, this has so far required a sub-build to be
set up. The changes here factor out the preparation of the scripts
from the creation of the targets, allowing future work to leverage these
steps without a sub-build (see #21703).
As part of the refactoring, some rationalisation of the stamp files,
repository info files and script names was done to make things more
consistent between download methods and step implementations.
Every download method now records its own specific repository info
in a file and that file is a dependency of the download step. The source
directory is also written to that file, so if the SOURCE_DIR changes, the
download will be retriggered (the existing implementation fails in this
scenario). Each download method now also has just one driver script
that implements the whole step (it may pull in other scripts to do its
task though). The patch step gained support for USES_TERMINAL as
a result of generalising the implementation for custom commands.
Fixes: #21748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation was scanning the documentation in
the file at runtime to determine the set of supported keywords for
each public function. This was fragile, made it difficult to restructure
the documentation and was sometimes observable in runtime
performance measurements. Change to a more conventional
approach where supported keywords are explicitly listed in the
code.
The internal _ExternalProject_SELF variable is no longer needed.
CMake now provides CMAKE_CURRENT_FUNCTION_LIST_DIR which
can be used for the same purpose and avoids having to set a
variable when the module is read. This also removes the
requirement that the module must be included by the current or a
parent scope. It is now enough that the module has been included
once somewhere before calling any of its functions.
The above changes combined mean that the module can now use
include_guard() and avoid having to re-parse the very long file every
time.
|
|
|
|
|
|
| |
When checking out a specific commit by its git hash, git will output
a very noisy message about checking out a detached HEAD. This
is not particularly helpful for us here and makes the output overall
quite verbose. Add a git config setting to prevent it.
|
|\
| |
| |
| |
| |
| |
| |
| | |
76fdeb6d13 Tests: FindGit already provides the git version, re-use it
315a200f0c FindGit: Cache the GIT_EXECUTABLE version for the current run
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5712
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
The change to the binary gitrepo.tgz file adds a commit which
adds a .gitignore file.
Fixes: #21278
|
|\
| |
| |
| |
| |
| |
| | |
7155e358c9 ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5626
|
| |
| |
| |
| | |
Fixes #21592.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing an ExternalProject superbuild with all output logged to
files, the output currently looks as follows:
```
[652/904] Performing install step for 'plasma-framework'
-- plasma-framework install command succeeded. See also /root/build/kde/frameworks/plasma-framework/log/plasma-framework-install-*.log
[658/904] Performing build step for 'khtml'
-- khtml build command succeeded. See also /root/build/kde/frameworks/khtml/log/khtml-build-*.log
[659/904] Performing install step for 'khtml'
-- khtml install command succeeded. See also /root/build/kde/frameworks/khtml/log/khtml-install-*.log
[661/904] Performing configure step for 'krunner'
-- krunner configure command succeeded. See also /root/build/kde/frameworks/krunner/log/krunner-configure-*.log
[661/904] Performing build step for 'krunner'
```
More specifically, because a success line is printed for every
succeeded step, we lose the advantage of Ninja's progress bar
which will now also print a new line instead of updating the same
link as happens when using Ninja in a normal CMake project.
By silencing the success message when using the Ninja generator,
Ninja's progress bar works as expected and updates inline instead
of printing a new line for each progress update.
With this change, the above output is reduced to a single line
progress bar:
```
[661/904] Performing build step for 'krunner'
```
|
|
|
|
| |
Issue: #19715
|
|
|
|
|
|
|
| |
The ExternalProject module cannot be implemented in the Xcode "new build
system" without using CMP0114's NEW behavior. When configuring for that
build system, warn if the policy is not set to NEW and use NEW behavior
anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ExternalProject_Add_StepTargets` and `INDEPENDENT_STEP_TARGETS` have
some limitations and lack some sanity checks. They can cause confusing
build systems to be generated. The basic problems are:
* The notion of step independence is attached to the step target
rather than the step itself.
* The custom commands implementing the steps are duplicated in the
step targets and the primary targets. This can cause races.
It is also incompatible with the Xcode "new build system".
Fix this by introducing policy CMP0114 to change the way step target
dependencies are handled. Define independence from external
dependencies as a property of each individual step regardless of whether
there is a target for it. Add dependencies among the primary target and
the step targets such that each custom command only appears in one
target. When some steps are disconnected from the primary target, add
step targets for the steps commonly depended upon so that there is a
place to hold their custom commands uniquely.
Fixes: #18663
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
116b06870d ExternalProject: add INACTIVITY_TIMEOUT argument
f24e34975a ExternalProject: retry download on recoverable errors
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5034
|
| |
| |
| |
| |
| |
| |
| | |
In order to abort transfers on slow connections the ExternalProject
command support passing the INACTIVITY_TIMEOUT argument.
Fixes: #20992
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When updates are disconnected, don't depend on skip-update because that
target is always considered out of date. Depend directly on the patch target
instead because it already depends on the appropriate target regardless of
whether updates are disconnected or not. This in turn means nothing depends
on the skip-update target, so it has also been removed.
Relates: #21086
|
|/
|
|
|
|
|
|
|
| |
The skip-update target is always considered out-of-date. The change in
7249ba9677 (ExternalProject: Enforce that patch depends on update, 2020-04-03)
made the patch target depend on skip-update, which in turn made it
always out of date too. The patch command should only be re-run if the download
needs to be performed again where updates are disconnected.
Fixes: #21086
|
|
|
|
|
|
|
|
|
| |
The optimization from commit 627fc5b44f (ExternalProject: Avoid
unnecessary checkout on clone, 2019-07-29, v3.16.0-rc1~325^2) triggers a
bug in the Git 2.20.x series that is not in older or newer versions.
Drop the optimization for that specific range of Git versions.
Fixes: #21009
|
|
|
|
|
|
| |
GitLab now uses a `/-/` component between the `group/project` part of
the URL and the `{issues,merge_requests,tree}` part so that it can
support `group/subgroup/project` with arbitrary depth.
|
|\
| |
| |
| |
| |
| |
| |
| | |
8dca6bd04b FetchContent: Preserve empty string arguments
cbf2daeed0 ExternalProject: Preserve empty string arguments
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4729
|
| | |
|
| |
| |
| |
| |
| | |
Fixes: #16528
Co-Authored-By: Michael Wake <macwake@gmail.com>
|
|/
|
|
|
|
|
|
| |
The refactoring exposed that the original implementation
was referring to an undefined variable src_name, which was
previously only used in error messages. This has been fixed
as part of the refactoring work.
Fixes: #20336
|
|\
| |
| |
| |
| |
| |
| | |
0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4710
|
| |
| |
| |
| |
| |
| |
| | |
This is needed so that the caller can add a dependency on the cache
file.
Fixes: #20668
|
| |
| |
| |
| |
| |
| |
| |
| | |
When looking at `list(FIND)` result, zero index is ignored due to
incorrect error handling, and users can't set dependencies on mkdir
step.
Fixes: #20605
|
| |
| |
| | |
Fixes: #17229
|
|\ \
| |/
| |
| |
| |
| |
| | |
2c4bb705e8 ExternalProject: allow `DOWNLOAD_NO_EXTRACT OFF`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4562
|
| |
| |
| |
| | |
Fixes: #20531
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
22aac6669b Help: install: use bullet lists to sort out target kinds
b3f4d50348 Help: ifw.rst: Add toc; mv "Hints" section -> subsection of "Variables"
c671966c20 Help: CPackComponent: Sectioning and rewording
05e56b1897 Help: FetchContent, ExternalProject: Command sections -> subsections
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4367
|
| | |
|
|/
|
| |
Fixes: #20354
|
|
|
|
|
|
|
|
|
|
| |
In commit 5bc6230741 (ExternalProject: Option to turn off recursive
update of git submodules, 2019-10-16) we implemented the feature in the
clone script written by `_ep_write_gitclone_script` but not in the
update script written by `_ep_write_gitupdate_script`. Implement the
latter by factoring out a common helper to use in both places.
Fixes: #20335
|
| |
|
| |
|
|
|
|
| |
Fixes: #19832
|
| |
|
|
|
|
|
|
| |
The clone step checks out the cloned branch but is always followed by an
explicit checkout of the desired `GIT_TAG`. Tell `git clone` not to
check out.
|
|
|
|
| |
Fixes #15592
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2bae6a1346 GHS: Update tests and notes
3b415c60c1 GHS: Update ExternalProject for GHS tools
83c47ef5b8 GHS: Update project layout to accommodate gbuild inconsistencies
5d2e1404bd GHS: Update project layout to build targets correctly
b6bfa7eeb2 GHS: Support add_dependencies() command
39ee9718d9 GHS: Support add_custom_target() command
8d3dad9a76 GHS: Support add_custom_command( OUTPUT ) signature
37acc9e229 GHS: Update custom command build events
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Narendhar Manimohan <narendhar15@gmail.com>
Merge-request: !3119
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
-- When using default values for the external project forward GHS platform
variables so that the external project builds with the same tools as
the original project.
-- Fix issue with bad top level project when GHS_PRIMARY_TARGET is set but has
no value. In this case treat it as unset and use default value.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When GIT_SHALLOW is used, the '--depth 1 --no-single-branch'
arguments are add. It means that only branch names and tags
is downloaded to repository. Most Commit Hash is not working.
With this commit the documentation was updated, to describe
the limitation of GIT_SHALLOW.
|
|
|
|
|
|
|
| |
Since commit 79410eeb1f (ExternalProject: Initialize Git submodules
recursively and on update (#16083), 2016-04-26, v3.6.0-rc1~105^2) our
`git submodule update` step uses the `--init` flag. This makes the
prior `git submodule init` unnecessary.
|
|
|
|
|
| |
Revise script generation to hard-code selected options instead of
building them with logic inside the script.
|