summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
Commit message (Collapse)AuthorAgeFilesLines
* AddCacheEntry: Suppress raw pointer usageMarc Chevrier2023-05-301-4/+4
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-2/+3
|
* cmValue: Use operator* explicitly to convert to std::string; avoid extra callVitaly Stakhovsky2023-01-161-1/+1
|
* Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix'Brad King2022-08-311-22/+46
|\ | | | | | | | | | | | | | | | | 0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX 43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7623
| * CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIXRobert Maynard2022-08-301-6/+7
| | | | | | | | Fixes #23900
| * cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handlingRobert Maynard2022-08-301-22/+45
| |
* | find_(program,library,file,path): add validation functionMarc Chevrier2022-06-141-2/+60
|/ | | | Fixes: #23603
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-1/+1
| | | | | | | | Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
* find_* commands: add control over Windows registry viewsMarc Chevrier2022-04-291-0/+15
| | | | Fixes: #22775
* Find: Support per call disabling of CMAKE_INSTALL_PREFIXRobert Maynard2022-04-151-2/+57
| | | | Fixes #23359
* find_package(): Refactor CMAKE_[SYSTEM_]IGNORE_PATHKyle Edwards2022-01-311-1/+1
| | | | | In the old implementation, CMAKE_[SYSTEM_]IGNORE_PATH was handled in cmFindCommon. Move it into cmFindPackageCommand.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-3/+3
|
* Use new AddCacheEntry signaturesMarc Chevrier2021-09-101-2/+2
|
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-2/+2
| | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* find_*: Add support for option NO_CACHEMarc Chevrier2021-06-021-46/+69
| | | | | | | | Request that find result is stored in a normal variable rather than a cache entry. Fixes: #20687 Issue: #20743
* set(CACHE): do not remove normal variableMarc Chevrier2021-05-201-5/+30
| | | | Fixes: #22038
* find_*: ensure consistent behavior for cache variablesMarc Chevrier2021-05-121-9/+49
| | | | Fixes: #22121
* find_*: refactor cache variable handlingMarc Chevrier2021-05-111-9/+53
|
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-3/+2
|
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* cmState::GetCacheEntryProperty: return cmPropVitaly Stakhovsky2020-03-251-2/+2
|
* cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-171-1/+1
|
* find_*: Add support for REQUIRED keywordSylvain Joubert2020-03-061-0/+4
| | | | | | In the same spirit as the REQUIRED keyword on find_package, this will stop cmake execution with an error on a failed find_program, find_file, find_path or find_library.
* cmFindBase: Use in-class member initializationSylvain Joubert2020-03-061-4/+0
|
* Merge topic 'add_find_call_debugging'Kyle Edwards2019-12-201-36/+95
|\ | | | | | | | | | | | | | | | | f3c9396260 Help: Document CMAKE_FIND_DEBUG_MODE 204b8d9f4e find_*: Use debug logging infrastructure a7ea20649d find_*: Add debug logging infrastructure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3935
| * find_*: Add debug logging infrastructureRobert Maynard2019-12-191-36/+95
| | | | | | | | | | | | | | | | | | | | | | | | Enable debug messages a new `--find-debug` command-line option or via the `CMAKE_FIND_DEBUG_MODE` variable. This work was started by Chris Wilson, continued by Ray Donnelly, and then refactored by Robert Maynard to collect information into a single message per find query. Co-Author: Ray Donnelly <mingw.android@gmail.com> Co-Author: Chris Wilson <chris+github@qwirx.com>
* | Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-2/+3
|/
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* cmFind*: Port away from cmCommandRegina Pfeifer2019-09-101-1/+4
|
* Merge branch 'backport-find-no-name' into find-no-nameBrad King2019-08-281-1/+1
|\
| * find_path: Fix crash on empty old-style list of namesBrad King2019-08-281-1/+1
| | | | | | | | Fixes: #19651
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
| | | | | | | | | | | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* | cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | | | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* | Find: Provide global controls for the `NO_[]_PATH` call optionsRobert Maynard2019-06-211-0/+3
|/
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-2/+1
|
* cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
|
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-6/+3
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-2/+2
|
* find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-12/+6
| | | | | | | | | | | | | | | | | | | 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
* MAINT: Misc. typosluz.paz2018-02-131-2/+2
| | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-8/+4
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9Brad King2017-08-081-0/+2
| | | | | | | | | | | | | | | | 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_*: Honor PATH_SUFFIXES in PackageName_ROOT pathsBrad King2017-07-111-0/+2
| | | | | | | This was accidentally forgotten in commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03). Fixes: #17052
* find_*: Add a new PackageRoot search path groupChuck Atkins2017-05-161-0/+22
| | | | | | The new PackageRoot search path group allows the PackageName_ROOT cmake and environment variables to be used as search prefixes for all find_* commands called from within a find module
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+6
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+1
|