Use Python3::Interpreter instead of Python3_EXECUTABLE
Summary
The target Python3::Interpreter
expands to Pyhton3_EXECUTABLE
when invoked in a command context, therefore this is completely backwards compatible. However, dune modules are called from a super directory (see !1391 (closed)), the Python3_EXECUTABLE
will not be present for other modules whereas the target will be globally available if CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
is set to TRUE.
- I do not know if the tests cover this, so I checked that all changed commands still work (with the exception of the bug in #376 (closed) which fails due to another reason).
- In my opinion this is a cleanup and can perfectly go into %DUNE 2.10.0, but I would understand if people want to postpone this into %DUNE 2.11.0.
Note: Python3_EXECUTABLE
is still present in the virtual env set up, but this is fine because this is immediately run after finding python so there is no scoping problems there.
Edited by Santiago Ospina De Los Ríos