Commit ca5b7bd9 by pybind11_abseil authors Committed by Copybara-Service

Move to Pybind11 at HEAD. Fix test execution error. Fix CMake policy warning.

PiperOrigin-RevId: 597039706
parent 19cbc499
......@@ -11,6 +11,9 @@ set(ABSL_PROPAGATE_CXX_STD ON)
set(BUILD_TESTING OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
cmake_policy(SET CMP0135 NEW)
find_package(Python3 COMPONENTS interpreter development)
FetchContent_Declare(
abseil-cpp
......@@ -20,12 +23,12 @@ FetchContent_Declare(
FetchContent_Declare(
pybind11
URL https://github.com/pybind/pybind11/archive/7d538a42750c8580eeaac10e505840a3694b04c8.tar.gz)
URL https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz)
FetchContent_MakeAvailable(abseil-cpp pybind11)
set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR})
include_directories(${TOP_LEVEL_DIR} ${PYTHON_INCLUDE_DIR}
include_directories(${TOP_LEVEL_DIR}
${pybind11_INCLUDE_DIRS})
add_subdirectory(pybind11_abseil)
......@@ -8,6 +8,10 @@ target_link_libraries(
shared_ptr_from_capsule absl::statusor)
# cpp_capsule_tools_testing_test ===============================================
if(NOT DEFINED PYTHON_EXECUTABLE)
set(PYTHON_EXECUTABLE ${PYBIND11_PYTHON_EXECUTABLE_LAST})
endif()
add_test(
NAME cpp_capsule_tools_testing_test
COMMAND
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment