summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_package/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* find_package(): Debug re-rooting behaviorKyle Edwards2024-08-021-0/+1
| | | | | | find_package()'s debug mode provides information about which prefixes are searched, but not which roots are prepended to each prefix. Display this information if debugging is enabled.
* FindBoost: Add policy to remove this moduleBrad King2024-05-031-0/+3
| | | | | | | | | | Upstream Boost 1.70 and above provide a proper `BoostConfig.cmake` package configuration file. Packages for all major distros now provide it in at least one LTS release. Add a policy to pretend that the `FindBoost` module does not exist so that projects calling `find_package(Boost)` use the upstream package directly. Closes: #19402
* MinGW: Search for packages in standard MSYSTEM environment prefixesBrad King2023-09-131-0/+4
| | | | | | | | | | | | | | | | MSYS2 and similar MinGW/MSYS distributions define development environments with a `MSYSTEM` environment variable. Each such environment has a documented installation prefix for its packages, often provided by a `MSYSTEM_PREFIX` environment variable. Since commit 84a25fc263 (cmake_host_system_information: Add MSYSTEM_PREFIX query, 2023-09-08) we can look up this prefix. Add `$MSYSTEM_PREFIX/local` and `$MSYSTEM_PREFIX` to our system search prefixes when targeting MinGW under `MSYSTEM` environments. This is their equivalent to `/usr/local` and `/usr`, which we search by default on UNIX systems. Issue: #24216
* FindPython{Interp,Libs}: Add policy to remove these modulesBrad King2023-03-301-0/+6
| | | | | | The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated since CMake 3.12. Add a policy to pretend they do not exist in order to encourage projects to port to `FindPython` or `FindPython{2,3}`.
* FindCUDA: Disallow with CMP0147 under Visual StudioBrad King2023-03-121-0/+5
| | | | | | | | | | FindCUDA's custom commands invoke `nvcc`, which invokes `cl`. Under VS this is done without a `/FS` flag, so `.pdb` generation races if we use `BuildInParallel`. The FindCUDA module has already been removed by policy CMP0146 after being deprecated since CMake 3.10, so it is simplest to just disallow this combination of features. Issue: #24576
* FindCUDA: Add policy to remove this moduleBrad King2023-03-091-0/+3
| | | | | | The `FindCUDA` module has been deprecated since CMake 3.10. Add a policy to pretend it doesn't exist in order to encourage projects to port away from it.
* Dart,FindDart: Add policy to remove these modulesBrad King2023-02-281-0/+3
| | | | | These modules and the "DART" tool they support have long been replaced by CTest.
* find_package: Use <PACKAGENAME>_ROOT variables as search prefixesBrad King2023-02-231-0/+11
| | | | | | | | | Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check upper-case `<PACKAGENAME>_ROOT` variables. Add policy `CMP0144` to enable the behavior in a compatible way. Fixes: #24403
* Tests: Add more find_package search path casesAlex Turbov2022-07-111-0/+16
|
* find_* commands: add control over Windows registry viewsMarc Chevrier2022-04-291-0/+30
| | | | Fixes: #22775
* Find: Support per call disabling of CMAKE_INSTALL_PREFIXRobert Maynard2022-04-151-0/+1
| | | | Fixes #23359
* find_package: Add support for default GLOBAL imported targetsJohn Parent2022-03-101-0/+1
| | | | | | | | | Allow find package to promote scope of imported targets by specifying an argument to `find_package` or by specifying a CMake variable. * Add support for CMAKE_GLOBAL_IMPORT_SCOPE variable * Add support for GLOBAL argument to find_package Additionally add testing for above features.
* find_package: Improve --debug-find-pkg= when using a find moduleBrad King2022-02-101-0/+1
| | | | | | | | | Extend the feature added by commit d7b18895bc (cmake: Add filtered debug-find options, 2021-12-07, v3.23.0-rc1~217^2) to enable debug output for `find_*` calls within a find module or cmake package configuration file. Fixes: #23211
* Tests: Improve order of RunCMake.find_package casesBrad King2022-02-101-3/+2
| | | | Sort recently added cases among similar-named cases.
* find_*(): Add CMAKE_IGNORE_PREFIX_PATH variableKyle Edwards2022-02-021-0/+1
| | | | Fixes: #20878
* find_package(): Add tests for CMAKE_IGNORE_PATHKyle Edwards2022-01-311-0/+1
|
* cmake: Add filtered debug-find optionsJohn Parent2021-12-171-0/+3
| | | | | | | | | | Add a `--debug-find-pkg=` option to debug find calls for specific packages. Add a `--debug-find-var=` option to debug find calls for specific return variables. Fixes: #21880
* find_package: Don't reroot prefix that is equal to a root pathAlexandru Croitor2021-10-201-0/+1
| | | | | | | | | | | When both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH are set to /opt/my_device_sysroot, cmFindCommon::RerootPaths would only look for packages in /opt/my_device_sysroot/opt/my_device_sysroot but would not try to look in /opt/my_device_sysroot. Make sure to not reroot the prefix path in such a case. Fixes: #21937
* find_package: Add variable to make package REQUIREDEugene Shalygin2021-07-081-0/+2
| | | | | | | | | | | | | | Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite behaviour: it turns non-required find_package call into the required one. While optional package dependencies usually result in simple and clean build logic, sometimes people want to be sure those optional dependencies will be found and used. Examples are reproducible builds and build instructions for 3rd parties. People choose to make find_package calls REQUIRED and put them behind an option(). Such workarounds blend build logic with build environment management and do not look elegant.
* WriteBasicConfigVersion supports version strings such as 21.07.04Robert Maynard2021-05-271-0/+1
| | | | Fixes #22207
* MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-261-1/+3
| | | | Detect MSYS as CYGWIN, with the required adaptations.
* find_package: raise error on empty version rangeMarc Chevrier2020-09-291-0/+2
|
* find_package: Add support of version rangeMarc Chevier2020-09-231-0/+9
| | | | This enhancement is the first step for solving issue #21107
* find_*: Use debug logging infrastructureRobert Maynard2019-12-191-0/+1
| | | | | | Teach the find_package, find_library, find_program, find_path, and find_file commands to print debug log messages when enabled by the `--debug-find` command-line option or `CMAKE_FIND_DEBUG_MODE` variable.
* FindPackage: Support `NO_[]_PATH` global call optionsRobert Maynard2019-07-221-0/+2
|
* find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKSDavid Aguilar2019-01-161-0/+3
|
* find_package(): Add policy to remove the FindQt moduleKyle Edwards2018-11-141-0/+3
| | | | | | | | Removing FindQt.cmake gives Qt upstream a path forward to export its own QtConfig.cmake files which can be found by find_package() without having to explicitly specify CONFIG. Projects that still want to use Qt3/4 can call find_package(Qt[34]), include(FindQt), or add FindQt.cmake to their CMAKE_MODULE_PATH.
* find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-0/+2
| | | | | | | | | | | | | | | | | | | This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and documented by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). However, we had to disable the feature and remove the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9, 2017-08-08) due to breaking projects that used `PackageName_ROOT` variables themselves. Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior in a compatible way. Also revise the stack of root paths to store the paths themselves rather than the package names. This way the policy can be considered at the `find_package` call site instead of individual `find_` calls inside a find module. Co-Author: Chuck Atkins <chuck.atkins@kitware.com> Issue: #17144
* find_package: Split PACKAGE_ROOT tests to work with smaller regexChuck Atkins2017-08-021-0/+2
|
* find_package: Restore longer message when config files were consideredBrad King2017-07-071-0/+2
| | | | | | | | | | | | | | | | | | Since commit v3.9.0-rc1~58^2 (find_package: shorten output for missing package in config mode, 2017-05-09) we print only the one line - Could NOT find Foo (missing: Foo_DIR) when package Foo cannot be found in CONFIG mode and it is not REQUIRED. However, in the case that package configuration files were found but not used, this one line message leaves out important information. This can happen when a package configuration file sets `Foo_FOUND` to `FALSE` or when its package version file does not match the requested version. Restore the longer message in these cases. Otherwise a seemingly valid explicit `Foo_DIR` setting appears to be silently ignored even if it was considered. Fixes: #17029
* find_*: Add tests for PackageRoot search path groupChuck Atkins2017-05-161-0/+1
|
* Tests: Add case for package version file unmatched policy scopeBrad King2015-11-241-0/+2
|
* find_package: Test rejection of required+optional componentsBrad King2012-03-191-0/+1
|
* find_package: additional test for checking the error messageAlex Neundorf2012-03-131-0/+1
| | | | | | | | This patch adds a test which checks the error message, which is produced in the case that a Config file has set Foo_FOUND to FALSE by itself. Alex
* Use generalized RunCMake test infrastrucure for find_package testBrad King2012-03-121-0/+14