Skip to content

Commit

Permalink
reformat linear_solver python code to BLACK; support pybind11_protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Jun 28, 2023
1 parent 9635b92 commit c52fcb4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
17 changes: 16 additions & 1 deletion patches/protobuf-v23.2.patch → patches/protobuf-v23.3.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec1641ba9..f4dcc999a 100644
index dc09f63db..7341519d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,12 @@ if (POLICY CMP0077)
Expand Down Expand Up @@ -67,3 +67,18 @@ index ec1641ba9..f4dcc999a 100644
${protobuf_BINARY_DIR}
${protobuf_SOURCE_DIR}/src)

diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index 715ffb51c..16edf9dcf 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -25,7 +25,9 @@ endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
target_link_libraries(libprotobuf PRIVATE log)
endif()
-target_include_directories(libprotobuf PUBLIC ${protobuf_SOURCE_DIR}/src)
+target_include_directories(libprotobuf PUBLIC
+ ${protobuf_SOURCE_DIR}/src
+ ${protobuf_SOURCE_DIR})
target_link_libraries(libprotobuf PUBLIC ${protobuf_ABSL_USED_TARGETS})
if(protobuf_BUILD_SHARED_LIBS)
target_compile_definitions(libprotobuf
22 changes: 22 additions & 0 deletions patches/pybind11_protobuf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e936f66..5461aaf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ target_include_directories(
# ============================================================================
# pybind11_native_proto_caster shared library
add_library(
- pybind11_native_proto_caster SHARED
+ pybind11_native_proto_caster STATIC
# bazel: pybind_library: native_proto_caster
pybind11_protobuf/native_proto_caster.h
# bazel: pybind_library: enum_type_caster
@@ -83,6 +83,8 @@ target_link_libraries(

target_include_directories(
pybind11_native_proto_caster
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PRIVATE ${PROJECT_SOURCE_DIR} ${protobuf_INCLUDE_DIRS} ${protobuf_SOURCE_DIR}
${pybind11_INCLUDE_DIRS})

0 comments on commit c52fcb4

Please sign in to comment.