eeaaffc find_package: Test error and warning messages in failure cases
52dffb9 Merge branch 'test-CMakeCommands' into find_package-improve-messages
d365104 find_package: Optionally warn when implicitly using Config mode
31ead5f find_package: Reject mixed use of MODULE- and CONFIG-only options
6d83083 find_package: mention requested version number in error message
9c39bbd find_package: add CONFIG mode keyword alias for NO_MODULE
f310f67 find_package: add MODULE mode to use only Find-modules
7d67dcf find_package: improve error message when no Find module is present
978d89b find_package: rename NoModule to UseFindModules
53d02ea FindPythonLibs: stop scanning when libraries are found
91d5a2a FindPythonLibs: put debug libraries into PYTHON_LIBRARIES
c9c1a17 FindPythonLibs: get the exact version of the found library (#3080)
f772378 FindPythonLibs: make the version selection work as for PythonInterp
bbddaee FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
Remove dependency on /Developer/Headers/FlatCarbon when creating SLAs for DMG images.
Instead, of adding those .r files on the command line, include the necessary .r files
from the generated .r file.
Add a "CMakeCommands.find_package" test to run CMake on a bunch of cases
in which find_package fails. Check that the process return code and
warning/error messages are as expected. Record expected test output in
corresponding files for reference by the check. These files will also
serve as a reference for the message text in each case.
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>
Explain exactly why CMake is looking for a package configuration file
and who is expected to provide what:
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "Find<pkg>.cmake" in CMAKE_MODULE_PATH the caller
has asked CMake to find a package configuration file provided by
"<pkg>", but CMake did not find one.
Could not find a package configuration file provided by "<pkg>"
with any of the names:
<pkg>Config.cmake
<pkg>-config.cmake
Add the installation prefix of "<pkg>" to CMAKE_PREFIX_PATH or
set "<pkg>_DIR" to a directory containing one of the above files.
If "<pkg>" provides separate development package or SDK be sure
it has been installed.
The first paragraph explains how CMake is interpreting the intention of
the caller. This puts the blame or credit at the call site in the
project code where it belongs both when it is a bug and when it is
intentional. It can be dropped in NO_MODULE mode.
Suggested-by: Brad King <brad.king@kitware.com>
In commit 41c2895b (Added version support to Config mode of find_package
command, 2008-01-28) the error message was computed but was not
reported. Add the SetError call to report it.
The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets. Factor the
install types out into their own enumeration.
There are versions out there that neither understand --version nor -V. Try a
completely different approach: execute a small python script that prints the
version number (and only that) in an easily reusable way using
sys.version_info. This is documented to work since Python 2.0. Use sys.version
for older versions, which is documented to exist since 1.5. If even that
doesn't work then simply assume we are on 1.4.0.