summaryrefslogtreecommitdiffstats
path: root/Modules/FindPackageHandleStandardArgs.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-9/+9
| | | | | | | 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'
* FPHSA: fix typo in documentationRolf Eike Beer2015-08-241-1/+1
|
* FPHSA: Document REQUIRED_VARS recommendation (#15352)Brad King2015-04-171-0/+4
| | | | State explicitly that the variables specified are user-facing.
* FPHSA: Revise and format documentationBrad King2015-04-171-110/+123
| | | | Use better reStructuredText markup and add cross-references.
* FPHSA: Always populate the ExactCase_FOUND variable (#15412).Stephen Kelly2015-04-171-31/+28
| | | | | | | | | | | 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.
* FPHSA: Revise documented command signatureGregor Jasny2015-03-181-1/+1
| | | | | | | For mode 2 the first argument is not the literal NAME but the package name. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* FPHSA: remove unneeded variable dereferencingRolf Eike Beer2014-10-251-2/+2
| | | | | | 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.
* Modules: Format documentation to avoid over-long preformatted linesBrad King2014-10-221-13/+15
| | | | | | 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.
* FPHSA: fix when requested or found version is exactly 0Rolf Eike Beer2014-10-071-3/+4
| | | | | Until now it was checked with "if(VAR)", which will be false in case "0" is the content of the variable.
* FPHSA: when EXACT version match is requested only compare the components givenRolf Eike Beer2014-10-071-4/+32
| | | | | | | | | 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.
* FPHSA: Avoid if() dereferencing of quoted variableBrad King2014-09-111-1/+1
| | | | | | | 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.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-66/+94
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* FPHSA: Fix FOUND_VAR check to work with if() auto-dereferenceStephen Kelly2013-03-181-1/+1
| | | | Otherwise, it seems to match on the content of the variable.
* FPHSA: improve documentationAlex Neundorf2013-02-221-8/+12
| | | | Alex
* FPHSA: Add FOUND_VAR option to specify _FOUND variable nameAlex Neundorf2013-02-221-15/+32
| | | | | | | | 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
* FPHSA: don't succeed if only checking for XX_FOUND (#13755)Alex Neundorf2012-11-291-1/+4
| | | | | | | | | | | | | 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
* Find* (and some other): use ${CMAKE_CURRENT_LIST_DIR} in include()Rolf Eike Beer2012-11-041-2/+2
| | | | | | 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
* find_package: add support for a <package>_NOT_FOUND_MESSAGE variableAlex Neundorf2012-09-281-0/+3
| | | | | | | | 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
* fphsa: clarify message about minimum required version found.Clinton Stimpson2012-08-161-1/+1
| | | | Thanks to Dubrovskiy Viacheslav.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-44/+44
| | | | | | | | | | | | | | | | | 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
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-151/+151
| | | | | | | | | | | | | | | | | 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
* FPHSA(): add HANDLE_COMPONENTS optionAlex Neundorf2012-03-191-2/+38
| | | | | | | | | 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
* FPHSA(): add missing "]" to documentationAlex Neundorf2012-03-191-1/+1
| | | | Alex
* FindPackageHandleStandardArgs: fix documentationYury G. Kudryashov2012-01-201-3/+3
| | | | State explicitly what CONFIG_MODE argument does.
* Also store the required version number in the details message.Alex Neundorf2010-09-271-1/+1
| | | | | | | This way the success/failure message of FPHSA() is also printed again if the required version is changed. Alex
* Improve version notice in the generated messageAlex Neundorf2010-08-301-53/+61
| | | | | | | | | | 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
* Add option CONFIG_MODE to FPHSA()Alex Neundorf2010-08-291-9/+55
| | | | | | | | 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
* Small cleanup of FindPackageHandleStandardArgs.cmakeAlex Neundorf2010-08-291-21/+17
| | | | | | | | -remove unnecessary arguments _VAR1 -move code for deciding the type of the message into helper macro _FPHSA_FAILURE_MESSAGE() Alex
* Add macro CMakeParseArguments() and use it in FPHSA()Alex Neundorf2010-08-141-71/+29
| | | | | | | | | 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
* Merge topic 'ImprovedVersionCheckingInSomeModules'Brad King2010-08-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix DETAILS string with version number in FHPSA()Alex Neundorf2010-08-071-1/+1
| | | | | | | | | | | | | | If found, the version which was found should be stored in the DETAILS string, but it was dereferenced twice, which was wrong. Alex
* | Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|/
* -fix indentation of the documentationAlex Neundorf2010-07-291-37/+39
| | | | Alex
* add 2nd, more powerful mode to find_package_handle_standard_args()Alex Neundorf2010-07-281-36/+206
| | | | | | | | | 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
* Convert CMake find-modules to BSD LicenseBrad King2009-09-281-0/+13
| | | | | | | 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.
* BUG: fix #6375: print the variables which were not found, so it's easier toAlexander Neundorf2008-05-111-2/+7
| | | | | | see what went wrong Alex
* ENH: Added FindPackageMessage moduleBrad King2008-03-171-3/+7
| | | | | | | | - 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
* STYLE: use a function instead of a macro, to keep FAIL_MESSAGE localAlexander Neundorf2008-02-061-2/+6
| | | | | | patch from Miguel Alex
* STYLE: fix typoAlexander Neundorf2007-08-071-1/+1
| | | | Alex
* ENH: add second failure message parameter toAlexander Neundorf2007-07-231-6/+16
| | | | | | | | 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
* ENH: add a macro FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 LIBXML2_LIBRARIES ↵Alexander Neundorf2007-07-181-0/+44
LIBXML2_INCLUDE_DIR) which handles the required and QUIET arguments and sets <NAME>_FOUND Alex