fix(cmake): upgrade maximum supported CMake version to 3.27 (#4786)

* Upgrade maximum supported CMake version to 3.27 to fix warning with CMP0148 policy (#4785)

* Update `macos_brew_install_llvm` pipeline to use expected Python installation

* Fix `Python_EXECUTABLE` Cmake variable typo

* Apply suggestions from code review

* fix: use FindPython for CMake 3.18+ by default for pybind11's tests

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* tests: fix issues with finding Python

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* tests: also set executable on subdir tests

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* fix(cmake): correct logic for FindPython

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Update ci.yml

* Revert "Update ci.yml"

This reverts commit 33798adf3f.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
Pol Mesalles
2023-12-14 12:36:45 -07:00
committed by GitHub
parent 7d538a4275
commit daea1130b4
13 changed files with 76 additions and 35 deletions

View File

@@ -54,7 +54,7 @@ if(NOT Python_FOUND AND NOT Python3_FOUND)
# If we are in submodule mode, export the Python targets to global targets.
# If this behavior is not desired, FindPython _before_ pybind11.
if(NOT is_config
AND NOT Python_ARTIFACTS_INTERACTIVE
AND Python_ARTIFACTS_INTERACTIVE
AND _pybind11_global_keyword STREQUAL "")
if(TARGET Python::Python)
set_property(TARGET Python::Python PROPERTY IMPORTED_GLOBAL TRUE)