[MLIR] [CMake/Python] Fix ignored Python3_EXECUTABLE
authorJohn Demme <john.demme@microsoft.com>
Thu, 10 Mar 2022 15:43:43 +0000 (07:43 -0800)
committerJohn Demme <john.demme@microsoft.com>
Thu, 10 Mar 2022 15:43:43 +0000 (07:43 -0800)
commitcb318526b0417b1a03255ee79920ad613b0ae691
treeed6d9ac2b2822f7656672202d24ca6d212047a81
parent9fac110bf70896a5411cf57b3ff34fab5798ab78
[MLIR] [CMake/Python] Fix ignored Python3_EXECUTABLE

On Windows (at least), cmake ignores Python3_EXECUTABLE unless the
'Interpreter' component is being found. If the user is specifying a
different version than the latest installed (say, 3.8 vs 3.9) with the
Python3_EXECUTABLE, cmake was using a combination of the newest version
and the desired version. Mitigated by adding 'Interpreter' in the first
invocation like the second one.
mlir/cmake/modules/MLIRDetectPythonEnv.cmake