summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.h
Commit message (Collapse)AuthorAgeFilesLines
* find_package: Fixed CMAKE_FIND_PACKAGE_PREFER_CONFIG Module fallbackCristian Adam2019-06-131-1/+8
| | | | Fixes: #19361
* find_package: Factor out module and config find_package methodsCristian Adam2019-05-201-0/+3
|
* ReadListFile: Accept std::string argumentVitaly Stakhovsky2019-01-311-1/+1
|
* find_package: optionally resolve symlinks when discovering packagesDavid Aguilar2019-01-161-0/+1
| | | | | | | | | Teach find_package() to resolve symlinks when constructing relocatable prefix paths from discovered cmake config files. The `CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable enables this behavior when set to `TRUE`. Fixes: #18704
* 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.
* IWYU: Fix workaround mapping for std::hashBrad King2018-08-071-3/+2
| | | | | | | | | It is provided by `functional`, not `utility`. Fix the mapping added by commit 276d3c7afe (IWYU: Add workaround mapping for std::hash, 2018-07-31). Also generalize the workaround from commit v3.12.0-rc1~39^2~1 (IWYU: Define a macro to tell code it is preprocessing for iwyu, 2018-05-25) to allow local builds to configure specific flags. This is needed because iwyu behaves differently in different environments.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-1/+1
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* cmAlgorithms: Speed up cmRemoveDuplicates methodLe Minh Phuc2018-05-251-0/+32
| | | | | | Use a hash table instead of a sorted vector to track entries. Co-authored-by: Chu Qinghao <me@qinghao1.com>
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-2/+2
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* find_package: Add missing PACKAGE_ROOT_PATH search path implementation.Chuck Atkins2017-07-281-0/+1
|
* cmCommand: remove unused methods from interface and all implementationsDaniel Pfeifer2017-05-111-5/+0
|
* cmCommand: remove IsScriptableDaniel Pfeifer2017-05-081-5/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | 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'
* cmConfigure: Ensure separate include block in headersDaniel Pfeifer2017-04-111-0/+1
| | | | | | | | | | | Make sure that `#include <cmConfigure.h>` is followed by an empty line in header files. This is necessary to make sure that changing <> to "" does not affect the include ordering of clang-format. Automate with: git grep -l '#include <cmConfigure.h>' | grep -v '.cxx$' \ | xargs sed -i '/#include <cmConfigure.h>/ { N; N; s/\n\{1,2\}/\n\n/ }'
* Add support for x32-abiSteven Newbury2017-03-071-0/+1
| | | | | | | | Detect x32-abi through CMakeCompilerABI infrastruture and use this information at runtime to determine the correct library paths with `FIND_LIBRARY_USE_LIBX32_PATHS`. Fixes: #15994
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-1/+10
|
* Make cmCommand not inherit from cmObjectDaniel Pfeifer2016-10-221-2/+0
|
* 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.
* find_package: Optionally sort globbed directories in a meaningful orderPierluigi Taddei2016-09-151-0/+26
| | | | | | | | | | | | Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify sort order and direction. When multiple package with the same name have been found in the same location sorting option can be used to force a specific version to be loaded (e.g. libA_1.12.0 instead of libA_1.1.0). Currently sorting by NAME and by NATURAL order have been implemented. Natural ordering makes use of the `strverscmp(3)` ordering.
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-5/+5
|
* Merge topic 'find_package-duplicate-search-paths'Brad King2016-06-161-0/+15
|\ | | | | | | | | | | 919db25c cmFindPackageCommand: remove duplicate paths from error message ebf18df5 cmFindPackageCommand: use iterators to loop over configurations
| * cmFindPackageCommand: remove duplicate paths from error messageBen Boeckel2016-06-131-0/+15
| | | | | | | | Fixes #15252.
* | Teach find_library and find_package to search lib32 paths (#11260)Daniel Scharrer2016-06-101-0/+1
|/ | | | | | | Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the ``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on multilib systems that use ``lib32`` directories and either do not have ``lib`` symlinks or point ``lib`` to ``lib64``.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-10/+24
| | | | | | | | | | | | | 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.
* Port CMake from cmIML to KWIMLBrad King2015-12-181-1/+1
| | | | KWIML no longer uses a configured prefix.
* find_package: Drop search in recent cmake-gui locationsBrad King2015-05-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | The find_package command, on Windows, has always searched build trees recently visited by cmake-gui (or CMakeSetup at one time). This was done when the command was created with the intention of simplifying workflows involving building multiple dependent projects. However, this behavior depends on recent developer interaction and therefore can create different find results based on transient system states. It can lead to surprising results and user confusion. Since this behavior was first added CMake has gained many more search options, better error messages when a package is not found, and a package registry. The latter in particular allows projects to make their build trees available for dependent projects to find without user intervention. Therefore the originally intended workflow can be achieved in other, more stable ways. After the above evoluion of find_package we have now decided that the magic search-where-cmake-gui-was behavior does more harm than good. Drop it. We do not need a policy for this behavior change because it only affects interactive use.
* Use containers of labeled search paths instead of individual membersChuck Atkins2014-11-121-0/+15
| | | | | | | Manage classes of search paths in labeled containers. This removes the need to have a seperate member variable for each type of search path, but also allows path types to be grouped togethor in various different ways and manipulated as subsets of the full set of search paths.
* Encapsulate search path manipulation functions into a seperate class.Chuck Atkins2014-11-111-4/+3
| | | | | | The functions for adding the various different types of paths have been factored out into a new class, cmSearchPath. It is to be used as a helper container class for the various find_* commands.
* Refactor and seperate search path construction for find commandsChuck Atkins2014-11-111-12/+15
| | | | | | | Prior to this commit, the set of search paths to traverse for find commands was incrementally constructed. This change allows each group of paths, i.e. CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be constructed and manipulated independently, and then all combined togethor.
* stringapi: Command namesBen Boeckel2014-03-081-1/+1
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-6/+6
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-1/+1
| | | | Variable names are always generated by CMake and should never be NULL.
* cmVersion: Fix CMake_VERSION_ENCODE for date in patch levelBrad King2014-02-101-1/+1
| | | | | | | | | Use a uint64_t to store encoded version numbers so we have plenty of bits available. Encode with room for up to 1000 minor releases between major releases and to encode dates until the year 10000 in the patch level. This is necessary because CMake development versions prior to release 2.8.0 used the date in the patch level, and this practice may be restored after the 3.0 release.
* Drop compatibility with CMake < 2.4Brad King2013-10-231-1/+0
| | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Drop builtin command documentationBrad King2013-10-161-16/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* fix #13195: avoid multiple mentions of found packagesAlex Neundorf2012-05-061-1/+1
| | | | | | | Now before adding a package to the list of found or not-found packages, the package is remvoed from both lists before. Alex
* Merge topic 'add-const-qualifiers'David Cole2012-03-021-4/+4
|\ | | | | | | | | | | 737c49a Add 'const' qualifier to some cmCommand members 261491f cmPropertyDefinition::IsChained is const
| * Add 'const' qualifier to some cmCommand membersYury G. Kudryashov2012-02-291-4/+4
| | | | | | | | | | Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
* | find_package: Optionally warn when implicitly using Config modeBrad King2012-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Define variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE for use by a project that wants to use an explicit mode in every call to find_package in order to generate more specific failure messages. Word the warning using the new CONFIG and MODULE mode keywords when the minimum required version of CMake is new enough to have them. Otherwise word the warning using the old NO_MODULE mode keyword. Inspired-by: Alex Neundorf <neundorf@kde.org>
* | find_package: add MODULE mode to use only Find-modulesAlex Neundorf2012-02-281-0/+1
| | | | | | | | | | The new mode differ from default mode in that that it doesn't fallback to config mode. The default mode stays unchanged.
* | find_package: rename NoModule to UseFindModulesAlex Neundorf2012-02-271-1/+1
|/ | | | | | ...positive logic is easier to handle Alex
* Refactor find_* command final path list computationBrad King2011-09-231-1/+0
| | | | | | | All find_* commands re-root the list of paths and then add trailing slashes. Factor this pair of calls out into a dedicated method. The new method would be the only caller to AddTrailingSlashes, so subsume that method into it.
* Teach find_(library|package) about Linux multiarch (#12037)Brad King2011-06-081-0/+1
| | | | | | | | | | | | | Implement support for multiarch as specified here: http://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec Detect the <arch> part of <prefix>/lib/<arch> from the implicit library search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE. Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should all be the same). Teach the find_library and find_package commands to search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
* find_package: Check both 32-bit and 64-bit registry viewsBrad King2011-04-131-1/+3
| | | | | | The system package registry is under HKEY_LOCAL_MACHINE\SOFTWARE which has separate views for 32-bit and 64-bit applications. Look in both views, but prefer the architecture matching the build target platform.
* find_package: Search a "system package registry"Brad King2011-04-131-1/+3
| | | | | | | | Generalize the "user package registry" created by commit ed0650f6 (Teach find_package to search a "package registry", 2009-09-01). Define a corresponding "system" registry key under HKEY_LOCAL_MACHINE. This gives package installers a place to create a registry value that points at the right location for find_package() to locate the package.
* find_package: Rename implementation of user package registryBrad King2011-04-131-2/+2
| | | | | Rename {Registry => UserRegistry} in names associated specifically with the user package registry and not registry access in general.
* Speedup find_* commands (#11412)Brad King2010-11-121-0/+2
| | | | | | | Delay computation of the command documentation until it is needed. It is wasteful to do it in the constructor on every call. Inspired-By: Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
* Replace the two vector<string,string> with one vector<struct{string,string}>Alex Neundorf2010-08-291-2/+3
| | | | | | | | | Before this patch there were two separate vectors, and the code made sure they always had the same size. With this patch the code doesn't have to ensure this anymore, there is only one vector now. Alex
* Record all considered Config files and their versions.Alex Neundorf2010-08-291-1/+4
| | | | | | | | As suggested on cmake-devel, find_package in Config-mode now records all considered config-files and their versions in <package>_CONSIDERED_CONFIGS and <package>_CONSIDERED_VERSIONS respectively. Alex