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 16:24:27 +0000 (09:24 -0700)
commitc4c3883b00d3a6aa657a5e3e515c90c9ea1f81c6
tree9b9acfba53c4f4e210839627dbec2652788ff9e6
parenta0004358a8e7f6956b8b59998e99f4ea8ee201f3
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.
15 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
lld/CMakeLists.txt
lld/test/Unit/lit.site.cfg.py.in
lld/test/lit.site.cfg.py.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