summaryrefslogtreecommitdiffstats
path: root/Help/command/find_program.rst
Commit message (Collapse)AuthorAgeFilesLines
* find_(library|file|path): Drop PATH-derived search prefixesBrad King2023-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include` and `<prefix>/lib` directories for prefixes with `bin` directories in the `PATH` environment variable. The motivation was to search the installation prefixes of MSYS and MinGW development environments automatically. This behavior can search undesired prefixes that happen to be in the `PATH` for unrelated reasons. It was reverted for non-Windows hosts within a year by commit b30b32a493 (Drop find_(library|file|path) prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was kept on Windows hosts to support its motivating use case. However, similar problems have since been observed on Windows. For example, commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the 'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily due to undesired discovery of libraries in `PATH`-derived prefixes. Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM environment prefixes, 2023-09-11) we search MSYS and MinGW environments' prefixes explicitly, so `PATH`-derived prefixes are no longer needed for the original motivating use case. Fixes: #24216
* Help: change links to point to the env.vars, not to the cmake varsAlex Neundorf2023-05-011-0/+5
| | | | | | | The documentation of the find-commands was pointing to the cmake variables CMAKE_PREFIX_PATH, CMAKE_INCLUDE_PATH etc. also in the section for environment variables. Now they point to the documentation for the respective environment variables.
* find_* commands: add control over Windows registry viewsMarc Chevrier2022-04-291-0/+2
| | | | Fixes: #22775
* Find: Provide global controls for the `NO_[]_PATH` call optionsRobert Maynard2019-06-211-1/+2
|
* 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_*: Disable the PACKAGE_ROOT search path group for CMake 3.9Brad King2017-08-081-2/+0
| | | | | | | | | | | | | | | | Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and remove documentation added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). Unfortunately the name `<pkg>_ROOT` may already be set by projects for their own incompatible purposes. Disable the behavior change for now to fix the regression for CMake 3.9. We can restore it later with a policy. In order to keep the implementation and tests working, add an undocumented variable we can use in the tests to enable the behavior before the policy is introduced. Fixes: #17144
* find_*: Add docs for PackageRoot search path groupChuck Atkins2017-05-191-0/+2
|
* find_program: Optionally consider all names in each directoryBrad King2015-09-021-1/+6
| | | | | | | When more than one value is given to the NAMES option this command by default will consider one name at a time and search every directory for it. Add a NAMES_PER_DIR option to tell this command to consider one directory at a time and search for all names in it.
* Help: Improve documentation formatting of find_* commandsBrad King2015-06-081-6/+9
| | | | | Use inline reStructuredText markup and add cross-references in more places.
* Help: Document the CMAKE_FIND_ROOT_PATH* variables.Stephen Kelly2013-11-271-1/+1
| | | | | Add a replacement template for the variables, and link to them from the documentation for the find_* commands.
* Help: Factor out find_* command duplicationBrad King2013-10-161-143/+17
| | | | | | | These documents were represented in the builtin documentation using a common starting point with placeholders substituted by each command. Convert them back to this approach using the reStructuredText include directive and substitutions to avoid duplication.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-0/+151
Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.