build: use `find_package(Python3)` if available
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 23 Apr 2020 20:46:47 +0000 (20:46 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 28 Apr 2020 01:33:10 +0000 (01:33 +0000)
commitcd84bfb8142bc7ff3a07a188ffb809f1d86d1fd7
tree8cd279f97d37bb23d6b0da8a144dcdbed5deabdb
parent29c6f5c7fdd981ebf03f7f61ab4c328fad7555dc
build: use `find_package(Python3)` if available

This is primarily motivated by the desire to move from Python2 to
Python3.  `PYTHON_EXECUTABLE` is ambiguous.  This explicitly identifies
the python interpreter in use.  Since the LLVM build seems to be able to
completed successfully with python3, use that across the build.  The old
path aliases `PYTHON_EXECUTABLE` to be treated as Python3.
12 files changed:
clang-tools-extra/test/lit.site.cfg.py.in
clang/CMakeLists.txt
clang/bindings/python/tests/CMakeLists.txt
clang/test/lit.site.cfg.py.in
clang/utils/perf-training/CMakeLists.txt
clang/utils/perf-training/lit.site.cfg.in
clang/utils/perf-training/order-files.lit.site.cfg.in
llvm/CMakeLists.txt
llvm/cmake/config-ix.cmake
llvm/cmake/modules/AddLLVM.cmake
llvm/test/lit.site.cfg.py.in
llvm/tools/llvm-shlib/CMakeLists.txt