| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|/ |
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
|
|
| |
This additional mode also supports version checking and should be
easily extendible, e.g. for COMPONENT stuff.
Updated FindBISON.cmake as first user of this new mode.
Docs updated.
Alex
|
|
|
|
|
|
|
| |
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all. Some had notices referring
to the BSD license already. This commit normalizes existing notices and
adds missing notices.
|
|
|
|
|
|
| |
see what went wrong
Alex
|
|
|
|
|
|
|
|
| |
- Defines FIND_PACKAGE_MESSAGE function to help display
find result messages only once
- Added use of it to FindPackageHandleStandardArgs
- Added use of it to FindQt4, and FindX11
- This cleans up repeated messages in big projects
|
|
|
|
|
|
| |
patch from Miguel
Alex
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
|
| |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(), so cmake modules can specify their own
better failure messages. If the default is ok use "DEFAULT_MSG".
Do this also for FindBoost.cmake (#5349)
Alex
|
|
LIBXML2_INCLUDE_DIR)
which handles the required and QUIET arguments and sets <NAME>_FOUND
Alex
|