| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
If a package is found but FPHSA is called by the find module without a
`VERSION_VAR`, and the `find_package` call specifies a version, we have
previously accepted the package as found. This was accidentally
regressed by commit 8f50f135ae (FPHSA: Improve error message when
VERSION_VAR is empty or has been unset(), 2022-08-01). Restore it and
add a test case.
|
|
|
|
|
|
|
|
|
| |
Previously, when `VERSION_VAR` is set but empty, FPHSA emitted a
confusing error message, saying that the package was found but of an
unsuitable version "". Fix the error message to state that the package
was not found.
Fixes: #23807
|
|
|
|
| |
Issue: #19715
|
|
|
|
| |
Fixes: #21505
|
| |
|
|
|
|
| |
Fixes: #21241
|
| |
|
|
|
|
| |
Fixes: #20655
|
|
|
|
|
|
| |
Using MATCHES "^${_Name}_FOUND$" limits the name of the found variable,
since it can't contain any regular expression special-chars (period,
plus sign, etc.)
|
|
|
|
|
|
|
| |
The `FPHSA_NAME_MISMATCHED` variable may be set if this is intentional
(but should be cleared after the call to not affect other FPHSA calls).
It may also be passed via the `NAME_MISMATCHED` option for new-signature
FPHSA calls.
|
|
|
|
| |
Fixes: #19660
|
| |
|
| |
|
|
|
|
|
|
|
| |
This was accidentally left out of commit aec27c152e (FPHSA: use more
localized _FOUND_VERSION instead of VERSION, 2017-09-05).
Fixes: #17281
|
| |
|
|
|
|
| |
This fixes the failing unit tests in which a cache variable VERSION is present or the found version is 0.
|
|
|
|
|
|
| |
Each missing variable is added to the string as " ${var}" which causes
the string to always have a leading space. Remove the duplicate space
due to this in the output.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
| |
|
|
|
|
| |
State explicitly that the variables specified are user-facing.
|
|
|
|
| |
Use better reStructuredText markup and add cross-references.
|
|
|
|
|
|
|
|
|
|
|
| |
The UPPERCASE name was inconsistent with config-packages, the
find_dependency macro, and even FPHSA itself, which expects
components to be specified with names matching ExactCase.
The FOUND_VAR was only permitted to have two possible values, and
now both are set for compatibility. Document it as obsolete, and
adjust the code for the same. Users of the variable should just
remove it.
|
|
|
|
|
|
|
| |
For mode 2 the first argument is not the literal NAME
but the package name.
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
|
|
|
|
|
|
| |
These variables can be dereferenced by if() alone so do not do it here, avoiding
the risk of their content being treated as a variable name and dereferenced
again.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Until now it was checked with "if(VAR)", which will be false in case "0" is the
content of the variable.
|
|
|
|
|
|
|
|
|
| |
Given that you have a foobar that identifies itself as 1.2.3 from now on a
find_package(foobar 1.2 EXACT)
will succeed, as 1.2.3 will now be considered as being 1.2. Until now this was
only the case for version 1.2.0.
|
|
|
|
|
|
|
| |
Legacy invocations may pass a variable name where "DEFAULT_MSG" belongs.
When comparing FPHSA_FAIL_MESSAGE to "DEFAULT_MSG", use a leading "x" on
both sides to avoid mistaking the value of the message for a variable
name.
|
|
|
|
|
|
|
|
| |
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
|
|
|
|
| |
Otherwise, it seems to match on the content of the variable.
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
|
| |
In the new mode FPHSA now accepts a FOUND_VAR option, which can be set
either to ExactCase_FOUND or UPPERCASE_FOUND, no other values are
accepted. Also add tests for that, including failure.
Alex
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes issue #13755.
FPHSA(XX DEFAULT_MSG XX_FOUND)
always succeeded due to the way how the XX_FOUND variable was set.
It was preset to TRUE, and then reset to FALSE if something was missing
(...which had the effect that XX_FOUND itself was already preset when FPHSA
checked whether XX_FOUND is set)
Now XX_FOUND is unset first, and only later on set to TRUE.
Alex
|
|
|
|
|
|
| |
This solves a lots of warnings, e.g. in the FindModulesExecuteAll test. If the
installed version on the system is rather old this may even lead to bugs, e.g.
https://bugs.gentoo.org/show_bug.cgi?id=436540
|
|
|
|
|
|
|
|
| |
If a config-file sets <package>_FOUND to FALSE, it can now give a reason
using the variable <package>_NOT_FOUND_MESSAGE, which is used by cmFindPackage
and FPHSA.
Alex
|
|
|
|
| |
Thanks to Dubrovskiy Viacheslav.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
|
|
|
|
|
|
|
|
| |
if the HANDLE_COMPONENTS is used, FPHSA() now also checks all required COMPONENTS,
i.e. all elements from <name>_FIND_COMPONENTS for which <name>_FIND_REQUIRED_<comp>
is true, and sets <name>_FOUND only to true if all have been found.
As discussed on cmake-developers.
Alex
|
|
|
|
| |
Alex
|
|
|
|
| |
State explicitly what CONFIG_MODE argument does.
|
|
|
|
|
|
|
| |
This way the success/failure message of FPHSA() is also printed again
if the required version is changed.
Alex
|
|
|
|
|
|
|
|
|
|
| |
Now the version number is also printed if no required version was
specified, but a version number was detected (showing more information
shouldn't hurt).
The code for generating the failure message in config-mode is moved
into a separate helper macro, it was becoming too much.
Alex
|
|
|
|
|
|
|
|
| |
When this option is used for FPHSA(), it automatically handles the
information created by a preceding find_package(NO_MODULE) all and
creates a proper success/error message.
Alex
|
|
|
|
|
|
|
|
| |
-remove unnecessary arguments _VAR1
-move code for deciding the type of the message into helper macro
_FPHSA_FAILURE_MESSAGE()
Alex
|
|
|
|
|
|
|
|
|
| |
This adds a macro cmake_parse_arguments() (as discussed on cmake-devel)
which can be used in macros or functions to help with parsing its
arguments. Detailled docs are included.
find_package_handle_standard_args() is the first user of this new macro.
Alex
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
430336c Merge branch 'findsubversion_fphsa_cleanup'
b6c6156 Use FPHSA() in FindSWIG, including version checking.
656cd2f Improved version checking for FindCUDA using the new mode of FPHSA
126db7b Improved version checking for FindSubversion using the new mode of FPHSA()
77d909b Fix DETAILS string with version number in FHPSA()
19b68b9 Improved version checking for FindJava using the new FPHSA() mode
6bb0b6e Improved version checking for FindRuby using the new mode of FPHSA()
946493f FindSquish doesn't detect the version, remove that from the documentation
cb9d1ea Add version checking support to FindFlex and FindPerlLibs
|
| |
| |
| |
| |
| |
| |
| | |
If found, the version which was found should be stored in the DETAILS
string, but it was dereferenced twice, which was wrong.
Alex
|