File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed
Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,19 @@ else()
4646 message (STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS} /xtensor" )
4747endif ()
4848
49- # Running find_package(PythonInterp) to retrieve the Python version
50- # which is not exported by Pybind11's cmake.
51- # Cf. https://github.com/pybind/pybind11/issues/2268
52- find_package (PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)
49+ find_package (Python COMPONENTS Interpreter REQUIRED)
5350
5451set (pybind11_REQUIRED_VERSION 2.6.1)
55- if ( TARGET pybind11 OR TARGET pybind11::headers)
56- # pybind11 has a variable that indicates its version already, so use that
57- message ( STATUS "Found pybind11 v ${pybind11_VERSION} " )
58- else ( )
52+ if ( NOT TARGET pybind11::headers)
53+ # Defaults to ON for cmake >= 3.18
54+ # https://github.com/pybind/ pybind11/blob/35ff42b56e9d34d9a944266eb25f2c899dbdfed7/CMakeLists.txt#L96
55+ set (PYBIND11_FINDPYTHON OFF )
5956 find_package (pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED)
6057 message (STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS} /pybind11" )
61- endif ()
58+ else ()
59+ # pybind11 has a variable that indicates its version already, so use that
60+ message (STATUS "Found pybind11 v${pybind11_VERSION} " )
61+ endif ()
6262
6363# Look for NumPy headers, except if NUMPY_INCLUDE_DIRS is passed,
6464# which is required under some circumstances (such as wasm, where
Original file line number Diff line number Diff line change 4040
4141# Finding NumPy involves calling the Python interpreter
4242if (NumPy_FIND_REQUIRED)
43- find_package (PythonInterp REQUIRED)
43+ find_package (Python COMPONENTS Interpreter REQUIRED)
4444else ()
45- find_package (PythonInterp )
45+ find_package (Python COMPONENTS Interpreter )
4646endif ()
4747
4848if (NOT PYTHONINTERP_FOUND)
Original file line number Diff line number Diff line change 77# The full license is in the file LICENSE, distributed with this software. #
88############################################################################
99
10- cmake_minimum_required (VERSION 2.8.2 )
10+ cmake_minimum_required (VERSION 3.29 )
1111
1212project (googletest-download NONE)
1313
Original file line number Diff line number Diff line change 77# The full license is in the file LICENSE, distributed with this software. #
88############################################################################
99
10- cmake_minimum_required (VERSION 2.8.2 )
10+ cmake_minimum_required (VERSION 3.29 )
1111
1212project (googletest-download NONE)
1313
1414include (ExternalProject)
1515ExternalProject_Add(googletest
1616 GIT_REPOSITORY https://github.com/google/googletest.git
17- GIT_TAG release-1.10 .0
17+ GIT_TAG v1.16 .0
1818 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR} /googletest-src"
1919 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} /googletest-build"
2020 CONFIGURE_COMMAND ""
You can’t perform that action at this time.
0 commit comments