summaryrefslogtreecommitdiff
path: root/Modules/FindPython3.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/FindPython3.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/FindPython3.cmake')
-rw-r--r--Modules/FindPython3.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/FindPython3.cmake b/Modules/FindPython3.cmake
index fdb99a69a7..5e42732c10 100644
--- a/Modules/FindPython3.cmake
+++ b/Modules/FindPython3.cmake
@@ -138,6 +138,17 @@ Hints
* If set to TRUE, search **only** for static libraries.
* If set to FALSE, search **only** for shared libraries.
+``Python3_FIND_STRATEGY``
+ This variable defines how lookup will be done.
+ The ``Python3_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.
+
``Python3_FIND_REGISTRY``
On Windows the ``Python3_FIND_REGISTRY`` variable determine the order
of preference between registry and environment variables.