Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] update pybind11 v2.10.3 to v2.12.0 #63741

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions cmake/external/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,12 @@ include(ExternalProject)
set(PYBIND_PREFIX_DIR ${THIRD_PARTY_PATH}/pybind)
set(PYBIND_SOURCE_DIR ${PYBIND_PREFIX_DIR}/src/extern_pybind)
set(PYBIND_INCLUDE_DIR ${PYBIND_SOURCE_DIR}/include)
set(PYBIND_TAG v2.10.3)
set(SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/pybind)
set(SOURCE_INCLUDE_DIR ${SOURCE_DIR}/include)

include_directories(${PYBIND_INCLUDE_DIR})

set(PYBIND_PATCH_COMMAND "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行和 50 行是不是也可以删掉了?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if(NOT WIN32)
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/pybind/cast.h.patch
native_dst)
# Note: [Why calling some `git` commands before `patch`?]
# Paddle's CI uses cache to accelerate the make process. However, error might raise when patch codes in two scenarios:
# 1. Patch to the wrong version: the tag version of CI's cache falls behind PYBIND_TAG, use `git checkout ${PYBIND_TAG}` to solve this.
# 2. Patch twice: the tag version of cache == PYBIND_TAG, but patch has already applied to cache.
set(PYBIND_PATCH_COMMAND
git checkout -- . && git checkout ${PYBIND_TAG} && patch -Nd
${SOURCE_INCLUDE_DIR}/pybind11 < ${native_dst})
endif()

ExternalProject_Add(
extern_pybind
Expand Down
15 changes: 0 additions & 15 deletions patches/pybind/cast.h.patch

This file was deleted.

2 changes: 1 addition & 1 deletion third_party/pybind
Submodule pybind updated 139 files