-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
With the update to Python3.cmake -DPYTHON_DIR is used as a HINT to search for a suitable Python3 version.
Sometimes just hinting towards a location is not enough and you would like to hardcode that and let the process fail miserably if nothing is found.
To keep the hinting behaviour of -DPYTHON_DIR=<path> we should add -DFORCE_PYTHON_DIR=TRUE that will switch from hinting => enforcing the search in PYTHON_DIR and nowhere else.
The whole processing in packaged CMake runs in an extra file from Python3.cmake kept in FindPython/Support.cmake that we would need to adopt to buildsystem/modules/FindPython/Support.cmake to let it be used by CMake and overwrite default behaviour.
Be aware, that we are limited to the 3.12.x version and functionality of CMake as this is our minimum version requirement, there are newer version of the files and It would make sense to test how far we can update that with the usage of our CMake 3.12.x minimum requirement. In the newer version there is a find virtual environment handling included that could be interesting for example.
Python3_FIND_VIRTUALENV
This variable defines the handling of virtual environments. It is meaningfull
only when a virtual environment is active (i.e. theactivatescript has
been evaluated). In this case, it takes precedence over
Python3_FIND_REGISTRYandCMAKE_FIND_FRAMEWORKvariables.