<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cmake.git/Modules/FetchContent, branch master</title>
<subtitle>gitlab.kitware.com: cmake/cmake.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/'/>
<entry>
<title>FetchContent: Reject CMAKE_TOOLCHAIN_FILE env var in sub-build</title>
<updated>2023-02-24T06:17:36+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2023-02-24T06:10:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=c15674a9cb0f8c6d432a52ac6fb724cc85f68034'/>
<id>c15674a9cb0f8c6d432a52ac6fb724cc85f68034</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>FetchContent: Only use @-@ replacements for sub-build CMakeLists.txt</title>
<updated>2023-02-24T06:07:01+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2023-02-24T06:07:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=31ef93f19ff9c1529024ab5e9b82143b99ef1c70'/>
<id>31ef93f19ff9c1529024ab5e9b82143b99ef1c70</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>FetchContent: Ignore EXACT for redirected find_package() calls</title>
<updated>2022-09-11T08:36:31+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2022-09-11T07:54:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=48b380c9613318b888473aa6f178d06de3f21e7e'/>
<id>48b380c9613318b888473aa6f178d06de3f21e7e</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Packages: Integrate FetchContent and find_package()</title>
<updated>2022-05-03T06:48:11+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2022-04-28T13:00:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=29e31e2825a2cd5099b8abe66f4816919cec934a'/>
<id>29e31e2825a2cd5099b8abe66f4816919cec934a</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>ExternalProject: Add support for USES_TERMINAL_PATCH keyword</title>
<updated>2022-02-03T14:27:35+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2022-02-03T11:00:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=cbb87e0a2c467cc9349e0d3180a5d2942fbca4e7'/>
<id>cbb87e0a2c467cc9349e0d3180a5d2942fbca4e7</id>
<content type='text'>
This brings the patch step into line with all the others which already
had their own `USES_TERMINAL_&lt;step&gt;` keyword. All steps (including
patch) already have their own `LOG_&lt;step&gt;` keyword too, so the lack of
`USES_TERMINAL_PATCH` was inconsistent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This brings the patch step into line with all the others which already
had their own `USES_TERMINAL_&lt;step&gt;` keyword. All steps (including
patch) already have their own `LOG_&lt;step&gt;` keyword too, so the lack of
`USES_TERMINAL_PATCH` was inconsistent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert ExternalProject and FetchContent refactoring</title>
<updated>2021-03-09T22:07:44+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2021-03-09T21:59:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=57d442e182bcb9a4426912ed7ba68b58c4dcc940'/>
<id>57d442e182bcb9a4426912ed7ba68b58c4dcc940</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>FetchContent: Invoke steps directly and avoid a separate sub-build</title>
<updated>2021-02-04T20:33:38+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2021-01-29T12:22:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=17e5516e608ba5c9c1f2dfad3d64f8f90874f108'/>
<id>17e5516e608ba5c9c1f2dfad3d64f8f90874f108</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>FindGit: Cache the GIT_EXECUTABLE version for the current run</title>
<updated>2021-01-19T23:16:21+00:00</updated>
<author>
<name>Craig Scott</name>
<email>craig.scott@crascit.com</email>
</author>
<published>2021-01-19T23:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=315a200f0c45415e8ab0da058aab9bbfa39c3c05'/>
<id>315a200f0c45415e8ab0da058aab9bbfa39c3c05</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>FetchContent: Remove unnecessary policy CMP0114 setting</title>
<updated>2020-10-08T15:59:05+00:00</updated>
<author>
<name>Brad King</name>
<email>brad.king@kitware.com</email>
</author>
<published>2020-10-08T15:58:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=ac765f5eff5cc8297a528d036f4104b3bf39f3e6'/>
<id>ac765f5eff5cc8297a528d036f4104b3bf39f3e6</id>
<content type='text'>
Now that `CMAKE_VERSION` is at least 3.19, the policy will be set to NEW
implicitly by the version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that `CMAKE_VERSION` is at least 3.19, the policy will be set to NEW
implicitly by the version.
</pre>
</div>
</content>
</entry>
<entry>
<title>ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"</title>
<updated>2020-09-18T17:46:45+00:00</updated>
<author>
<name>Brad King</name>
<email>brad.king@kitware.com</email>
</author>
<published>2020-09-14T19:05:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/cmake.git/commit/?id=b8ecd4df5f9259f102d82011693eca6282be5ae6'/>
<id>b8ecd4df5f9259f102d82011693eca6282be5ae6</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
