[PATCH] D64894: [CMake] Don't set Python_ADDITIONAL_VERSIONS

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 08:44:04 PDT 2019


mgorny added inline comments.


================
Comment at: llvm/docs/GettingStarted.rst:601-604
+| PYTHON_EXECUTABLE       | Forces CMake to use a specific Python version by   |
+|                         | passing a path to a Python interpreter. By default |
+|                         | the Python version of the interpreter in your PATH |
+|                         | is used.                                           |
----------------
JDevlieghere wrote:
> JosephTremoulet wrote:
> > FWIW, my experience yesterday was that I needed to also set `PYTHON_LIBRARY` and `PYTHON_INCLUDE_DIR` to avoid just erroring out with mismatches (but setting all three did work, once I figured out that PYTHON_LIBRARY needs to point to a file while the other two need to point to directories).  It might be worth mentioning something along the lines of "You may also need to set `PYTHON_LIBRARY` and `PYTHON_INCLUDE_DIR`"?  I phrased that as a question b/c I don't know if it's something that others will run into, or if I just have something funny in my environment somehow. 
> This shouldn't be necessary anymore after this change! 
Actually, I think it will be necessary if you change `PYTHON_EXECUTABLE` while having the other two cached. However, I'd rather fix the code to do a second lookup than expect users to override everything. However, I still need to think how we could achieve that.

Hmm, maybe instead of erroring out immediately we could clean cache vars and retry `find_package()`?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64894





More information about the llvm-commits mailing list