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>
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
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
Add platform configuration variable CMAKE_SYSTEM_IGNORE_PATH and user
configuration variable CMAKE_IGNORE_PATH. These specify a set of
directories that will be ignored by all the find commands. Update
FindPackageTest so that several cases will fail without a functioning
CMAKE_IGNORE_PATH.
When <pkg>_DIR is set to an incorrect version we search again and store
the result in the variable, even if it is <pkg>_DIR-NOTFOUND.
There was a bug in the case when the new search does not find anything
and the old value came from a cache entry with UNINITALIZED type. The
command used to try to load a package configuration file from the last
place searched, and would leave the old wrong value in the entry. This
commit fixes the behavior to avoid trying to load a missing file and to
set the value to <pkg>_DIR-NOTFOUND as expected.
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
A common user workflow is to build a series of dependent projects in
order. Each project locates its dependencies with find_package. We
introduce a "user package registry" to help find_package locate packages
built in non-standard search locations.
The registry explicitly stores locations of build trees providing
instances of a given package. There is no defined order among the
locations specified. These locations should provide package
configuration files (<package>-config.cmake) and package version files
(<package>-config-version.cmake) so that find_package will recognize the
packages and test version numbers.
Isolation of policy changes inside scripts is important for protecting
the including context. This teaches include() and find_package() to
imply a cmake_policy(PUSH) and cmake_policy(POP) around the scripts they
load, with a NO_POLICY_SCOPE option to disable the behavior. This also
creates CMake Policy CMP0011 to provide compatibility. See issue #8192.
to by the Foo_DIR variable there is no FooConfig.cmake file, then instead of
abort and complain that the user should set or clear the Foo_DIR variables,
just search for the file and discard the old Foo_DIR contents
The tests succeed, ok by Brad.
Alex
When the find_package command loads a module it sets several
<pkg>_FIND_XXX variables to communicate information about the command
invocation to the module. This restores the original state of the
variables when the command returns. This behavior is useful when a
find-module recursively calls find_package with NO_MODULE so that the
inner call does not change the values in the find-module.
Make the number of version components specified explicitly available.
Set variables for unspecified version components to "0" instead of
leaving them unset. This simplifies version number handling for find-
and config-modules. Also support a fourth "tweak" version component
since some packages use them.
- Hints are searched after user locations but before system locations
- The HINTS option should have paths provided by system introspection
- The PATHS option should have paths that are hard-coded guesses
- Add each part of the search order in a separate method.
- Collect added paths in an ivar in cmFindCommon.
- Move user path storage up to cmFindCommon and share
between cmFindBase and cmFindPackageCommand.
- Expand user path registry values up in cmFindCommon
- Enables 32-/64-bit registry view for find_package
- Disables registry expansion for paths not specified
with the PATHS argument, which is not expected.
- Added EXACT option to request an exact version.
- Enforce version using check provided by package.
- Updated FindPackageTest to test versioning in config mode.
- Use CMAKE_PREFIX_PATH and CMAKE_SYSTEM_PREFIX_PATH among other means
to locate package configuration files.
- Create cmFindCommon as base for cmFindBase and cmFindPackageCommand
- Move common functionality up to cmFindCommon
- Improve documentation of FIND_* commands.
- Fix FIND_* commands to not add framework/app paths in wrong place.