[PATCH] D78762: build: use `find_package(Python3)` if available

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 24 12:26:41 PDT 2020


compnerd added a comment.

@JDevlieghere I dont think that adding another mechanism for finding the python executable is not the right approach.  You already have the variables that you are talking about, you just need to specify it in triplicate if you want compatibility across all the versions, but specifying `-DPython3_EXECUTABLE=` gives you the control over the executable for python3.  If you want to use python2, `-DPython3_EXECUTABLE=` and `-DPython2_EXECUTABLE=` will ensure that python2 is always used.  If you are using an older CMake, specifying `-DPython3_EXECUTABLE=`, `-DPython2_EXECUTABLE=` and `-DPYTHON_EXECUTABLE=` will ensure that the specified version is used.  I'm not sure what the scenario is that you believe will be made more difficult with this approach.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78762/new/

https://reviews.llvm.org/D78762





More information about the cfe-commits mailing list