diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-05-15 15:35:49 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-05-21 14:13:27 (GMT) |
commit | 9f205acefe256ac9707cd500ea1d421916f013cd (patch) | |
tree | 4ee6cd3072afc921319f2c3119ea8e576413729e /Modules/FindPython2.cmake | |
parent | 0bf53483295a4b7de358e8b85ad44866d89633c5 (diff) | |
download | CMake-9f205acefe256ac9707cd500ea1d421916f013cd.zip CMake-9f205acefe256ac9707cd500ea1d421916f013cd.tar.gz CMake-9f205acefe256ac9707cd500ea1d421916f013cd.tar.bz2 |
FindPython: Implement lookup strategies.
Configration variable Python_FIND_STRATEGY controls the lookup startegy.
Possible values are LOCATION and VERSION.
Fixes: #19159
Diffstat (limited to 'Modules/FindPython2.cmake')
-rw-r--r-- | Modules/FindPython2.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake index 67499d8..eea4d29 100644 --- a/Modules/FindPython2.cmake +++ b/Modules/FindPython2.cmake @@ -138,6 +138,17 @@ Hints * If set to TRUE, search **only** for static libraries. * If set to FALSE, search **only** for shared libraries. +``Python2_FIND_STRATEGY`` + This variable defines how lookup will be done. + The ``Python2_FIND_STRATEGY`` variable can be set to empty or one of the + following: + + * ``VERSION``: Try to find the most recent version in all specified + locations. + This is the default. + * ``LOCATION``: Stops lookup as soon as a version satisfying version + constraints is founded. + ``Python2_FIND_REGISTRY`` On Windows the ``Python2_FIND_REGISTRY`` variable determine the order of preference between registry and environment variables. |