| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Issue: #20132
Signed-off-by: Raul Metsma <raul@metsma.ee>
|
|
|
|
|
|
|
|
|
|
| |
This variable has long been provided by `configure_package_config_file`
in the `@PACKAGE_INIT@` part of the package configuration file it
generates. Although not publicly documented, projects have come to
use it. Now that we preserve the value across nested `find_package`
calls, it has a stable meaning.
Issue: #25827
|
|
|
|
|
|
|
| |
This refactoring makes the generated file follow the same structure as
generate_apple_platform_selection_file(). It uses a single if-elseif-else-endif
block rather than a sequence of if-endif blocks. This avoids any early
return() calls, allowing cleanup code to be added at the end later.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Revert commit 6ddf8712cd (CMakePackageConfigHelpers: Use unique variable
name for pkg prefix, 2024-03-30, v3.29.1~8^2). It regressed existing
projects that rely on the undocumented `PACKAGE_PREFIX_DIR` variable in
package configuration files generated by `CMakePackageConfigHelpers`.
Fixes: #25873
Fixes: #25885
Issue: #25827
|
|
|
|
| |
Fixes: #25827
|
| |
|
|
|
|
|
|
|
| |
Add an option to capture error messages in a variable instead of
terminating with a fatal error.
Fixes: #25778
|
|
|
|
|
|
| |
Also add a test case.
Fixes: #25780
|
|
|
|
|
|
|
| |
Allow callers to pass multiple values to list-valued arguments
instead of putting the entire list in a single quoted argument.
Fixes: #25779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The helpers added by:
* commit 37bc3400cd (CMakePackageConfigHelpers: Add
generate_apple_platform_selection_file(), 2023-11-03)
* commit 4ac5a2f866 (CMakePackageConfigHelpers: Add
generate_apple_architecture_selection_file(), 2023-12-19)
were worded in terms of including package configuration files, but the
actual functionality is to include files *from* package configuration
files. The included files do not themselves need to be usable as
package configuration files.
Rename the options and clarify the documentation accordingly.
Issue: #25262
Issue: #25516
|
|
|
|
|
|
|
| |
Add a helper to select architecture-specific implementations of a
package on an Apple-specific platform.
Fixes: #25516
|
| |
|
|
|
|
| |
This is necessary to forward to `configure_package_config_file`.
|
|\
| |
| |
| |
| |
| |
| |
| | |
dc5098429b CMakePackageConfigHelpers: Clarify Apple platform selection usage error
3b9586671c CMakePackageConfigHelpers: Clarify Apple platform selection template name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9087
|
| |
| |
| |
| | |
`generate_apple_platform_selection_file` requires `INSTALL_DESTINATION`.
|
| |
| |
| |
| |
| |
| | |
The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add
generate_apple_platform_selection_file(), 2023-11-03) is specific to
Apple platforms. Give it an Apple-specific name.
|
|/
|
|
| |
Previously the documentation was not rendered correctly.
|
|
|
|
|
|
| |
The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add
generate_apple_platform_selection_file(), 2023-11-03) is a private
implementation detail. Move it to `Modules/Internal/`.
|
|
|
|
| |
Issue: #25262
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The example shown in the module documentation for
CMakePackageConfigHelpers was showing its age, by:
1. Hardcoding directory prefixes (`etc/`, `lib/`, etc.) instead of
using GNUInstallDirs
2. Handwaving `set()` commands (incorrectly!) as:
`set(VAR dir/ ... CACHE )`
which should, at the very least, be:
`set(VAR dir/ CACHE ... )`
3. Installing CMake configuration files to `lib/Foo/cmake/`, when
current practice favors `${CMAKE_INSTALL_LIBDIR}/cmake/Foo/`
This updated example addresses all of those issues.
|
|
|
|
|
|
|
|
| |
In commit 55c3b6a77e (CMakePackageConfigHelpers: Relax restrictions on
version range, 2019-05-30, v3.20.0-rc1~295^2~1) the documentation for
write_basic_package_version_file documented the support of version
ranges by the generated version files, however the note wrongly
specifies a COMPATIBILITY_MODE argument, instead of COMPATIBILITY.
|
| |
|
| |
|
|
|
|
| |
Issue: #19715
|
| |
|
| |
|
|
|
|
|
|
|
| |
Allow skipping the architecture check in the package version file generated from calling
write_basic_package_version_file. Document said architecture check.
Fixes: #16184
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Macro 'check_required_components' should be called even if there are no
components provided by package. This will make sure error is reported
in next cases:
find_package(Foo CONFIG REQUIRED oops) # 'oops' treated as component
find_package(Foo CONFIG REQUIRED COMPONENTS foo) # no components expected
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some are user facing.
Found using
codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
whereby the whitelist contained:
ans
dum
helpfull
emmited
emmitted
buil
iff
isnt
nto
ot
pathes
substract
te
todays
upto
whitespaces
|
|
|
|
|
|
|
| |
Some of our "cmake" code blocks do not use fully valid CMake syntax
because they have placeholders for human reference. Sphinx has
never been able to properly lex and highlight these, but now warns.
Fix each block's syntax or change to a non-cmake block as appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cmake_parse_arguments command is builtin with version 3.5.
The CMakeParseArguments module is empty and exists for backwards
compatibility with CMake 3.4 and lower.
Remove the includes of CMakeParseArguments from CMake's modules.
The modules are always used with the current version of CMake.
Leave the includes in the tests, as the tests may be run with an older
version of CMake.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
|
|
|
|
|
|
| |
Automate with:
find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
|
| |
|
|
|
|
|
|
| |
Convert several preformatted code block literals that enumerate lists of
options or variables to use reST definition lists instead. Manually
wrap other long lines in code blocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option instructs configure_package_config_file to consider paths
that are not absolute as relative to the INSTALL_PREFIX directory
instead of relative to the CMAKE_INSTALL_PREFIX directory.
If this argument is not passed, the default behaviour is to use
the CMAKE_INSTALL_PREFIX variable.
The new signature is therefore:
configure_package_config_file(<input> <output> INSTALL_DESTINATION <path>
[PATH_VARS <var1> <var2> ... <varN>]
[NO_SET_AND_CHECK_MACRO]
[NO_CHECK_REQUIRED_COMPONENTS_MACRO]
[INSTALL_PREFIX <path>])
|
| |
|
| |
|
|
|
|
|
|
|
| |
In the write_basic_package_version_file(), the VERSION argument
is now optional. If none is given, it falls back to ${PROJECT_VERSION}.
Alex
|
|
|
|
|
|
|
| |
There is not really any need to. Downstreams can either rely on it
being provided by CMake, or copy and distribute it.
Change the documented include for the find_dependency macro.
|
|
|
|
|
| |
This allows Config file authors to use it without having to use
CONFIGURE_PACKAGE_CONFIG_FILE.
|
|
|
|
|
|
|
|
| |
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
|
|
|
|
|
|
| |
This macro handles the EXACT, REQUIRED and QUIET options
and sets an appropriate NOT_FOUND_MESSAGE for the package
if a dependency is not found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 0c727b90 (install(EXPORT): Force absolute paths for usr-move,
2013-03-08) and commit d4774140 (configure_package_config_file: force
absolute paths for usr-move, 2013-01-24) we supported Linux
distributions implementing the "/usr move" by assuming that installation
to (/usr)?/lib(64)? represents a non-relocatable system package.
When cross-compiling one may prepare a package for installation into a
system location on a target machine but install the package files on the
*host* machine inside another path for use with CMAKE_FIND_ROOT_PATH.
In this case the package development files must still be relocatable.
Handle "/usr move" with a new approach that works with relocatable
files. Teach configure_package_config_file and install(EXPORT) to
generate special logic in a package configuration file or targets file
for installation under (/usr)?/lib(64)?. Teach the file to recognize
when it is loaded through a symlink that refers to the same realpath as
its original install destination. In such a case, use the original
install prefix. Otherwise, compute the prefix relative to the current
file location to make it relocatable.
|