| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The sub-build should never try to use a toolchain file. The toolchain file
may itself be getting downloaded by FetchContent. If the
CMAKE_TOOLCHAIN_FILE environment variable is set, CMake uses it to
initialize the CMake variable of the same name. We need to explicitly
clear them before the first project call of the sub-build.
Fixes: #24535
|
|
|
|
|
|
|
| |
There was a mix of ${} and @-@ substitutions in the CMakeLists.txt.in
file. It is sometimes useful to temporarily put ${} evaluations there while
working on issues, but they get replaced. Using @ONLY leaves them
untouched and uses a consistent substitution method for the whole file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When FetchContent_MakeAvailable() populates a dependency for which
find_package() integration is enabled, all future calls to find_package()
MUST succeed using the contents of the redirection directory. The
generated config version file was not handling calls where the EXACT
keyword was given, resulting in such calls rejecting the redirection
directory's contents and continuing its search. It is not allowed to do
that. Fix the generated file to also set PACKAGE_VERSION_EXACT to
true so that calls with EXACT now accept it, as was originally intended.
Fixes: #23950
|
|
|
|
|
|
|
|
| |
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.
Fixes: #21687
|
|
|
|
|
|
|
| |
This brings the patch step into line with all the others which already
had their own `USES_TERMINAL_<step>` keyword. All steps (including
patch) already have their own `LOG_<step>` keyword too, so the lack of
`USES_TERMINAL_PATCH` was inconsistent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
| |
Now that `CMAKE_VERSION` is at least 3.19, the policy will be set to NEW
implicitly by the version.
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Fixes: #20526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|