[all-commits] [llvm/llvm-project] 45c056: [CMake] Find python before searching for python mo...

Dimitry Andric via All-commits all-commits at lists.llvm.org
Fri Aug 5 01:48:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45c056b1fb5a9bc797e935b160aa07bf53764a3a
      https://github.com/llvm/llvm-project/commit/45c056b1fb5a9bc797e935b160aa07bf53764a3a
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M llvm/CMakeLists.txt
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  -----------
  [CMake] Find python before searching for python modules

In the top-level llvm `CMakeLists.txt`, we need to call
`find_package(Python3)` *before* including `config-ix.cmake`, otherwise
the latter will not be able to successfully search for python modules
using `find_python_module()`. Also set `LLVM_MINIMUM_PYTHON_VERSION`
before calling `find_package(Python3)`, moving it to `CMakeLists.txt`
from `HandleLLVMOptions.cmake`.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D131191




More information about the All-commits mailing list