summaryrefslogtreecommitdiff
path: root/Modules/FindPython2.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-05-15 17:35:49 +0200
committerMarc Chevrier <marc.chevrier@gmail.com>2019-05-21 16:13:27 +0200
commit9f205acefe256ac9707cd500ea1d421916f013cd (patch)
tree4ee6cd3072afc921319f2c3119ea8e576413729e /Modules/FindPython2.cmake
parent0bf53483295a4b7de358e8b85ad44866d89633c5 (diff)
downloadcmake-9f205acefe256ac9707cd500ea1d421916f013cd.tar.gz
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.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index 67499d827f..eea4d292b2 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.