summaryrefslogtreecommitdiffstats
path: root/Source/cmFindCommon.cxx
Commit message (Collapse)AuthorAgeFilesLines
* find_* commands: add control over Windows registry viewsMarc Chevrier2022-04-291-0/+12
| | | | Fixes: #22775
* Find: Support per call disabling of CMAKE_INSTALL_PREFIXRobert Maynard2022-04-151-2/+6
| | | | Fixes #23359
* find_package: Improve --debug-find-pkg= when using a find moduleBrad King2022-02-101-1/+2
| | | | | | | | | 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
* find_*(): Add CMAKE_IGNORE_PREFIX_PATH variableKyle Edwards2022-02-021-8/+38
| | | | Fixes: #20878
* find_package(): Refactor CMAKE_[SYSTEM_]IGNORE_PATHKyle Edwards2022-01-311-7/+10
| | | | | In the old implementation, CMAKE_[SYSTEM_]IGNORE_PATH was handled in cmFindCommon. Move it into cmFindPackageCommand.
* cmake: Add filtered debug-find optionsJohn Parent2021-12-171-0/+6
| | | | | | | | | | 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
* Source: fix many -Wmissing-prototypes warnings by marking functions staticSean McBride2021-10-251-1/+1
|
* find_package: Don't reroot prefix that is equal to a root pathAlexandru Croitor2021-10-201-2/+8
| | | | | | | | | | | 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
* Rename cmProp in cmValueMarc Chevrier2021-09-211-7/+7
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-1/+1
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-1/+1
|
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-14/+13
|
* Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-4/+4
|
* cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-7/+1
| | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* Merge topic 'add_find_call_debugging'Kyle Edwards2019-12-201-0/+17
|\ | | | | | | | | | | | | | | | | 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-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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-2/+8
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-4/+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`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-2/+3
|
* Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docsRobert Maynard2019-07-091-1/+1
|
* Find: Provide global controls for the `NO_[]_PATH` call optionsRobert Maynard2019-06-211-0/+21
|
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-1/+2
|
* Prefer front/back/data over dereferencing begin/rbegin iterArtur Ryt2019-02-061-1/+1
| | | | Changed for sequenced containers: vector, list, string and array
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-3/+3
|
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-2/+2
|
* Fix misc. typosluz.paz2018-06-041-2/+2
| | | | Found via `codespell` and `grep`
* find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-7/+0
| | | | | | | | | | | | | | | | | | | 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
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-1/+1
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Fix trivial typos in textluzpaz2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-22/+16
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-2/+2
|
* find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9Brad King2017-08-081-0/+7
| | | | | | | | | | | | | | | | 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
* cmFindCommon: Drop unused FilterPaths methodBrad King2017-07-111-12/+0
| | | | | | The method has not been used since commit v3.2.0-rc1~400^2~1 (Encapsulate search path manipulation functions into a seperate class, 2014-10-15).
* cmFindCommon: Fix typo in PackageName_ROOT path labelBrad King2017-07-111-1/+1
|
* Remove second arg: npos in substr usagesPavel Solodovnikov2017-06-011-1/+1
|
* Access string npos without instancePavel Solodovnikov2017-06-011-1/+1
|
* find_*: Add a new PackageRoot search path groupChuck Atkins2017-05-161-2/+10
| | | | | | 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
* Merge topic 'split-sysroot'Brad King2017-05-111-1/+13
|\ | | | | | | | | | | | | 53e89b6a Add options for separate compile and link sysroots Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !819
| * Add options for separate compile and link sysrootsBrad King2017-05-091-1/+13
| | | | | | | | | | | | | | | | | | Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
* | cmFindCommon: remove unused function SetMakefileDaniel Pfeifer2017-05-101-12/+0
|/
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-3/+4
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+1
|
* Separate compilation for commands included in cmBootstrapCommands1Daniel Pfeifer2016-10-211-0/+2
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-2/+2
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-162/+98
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.