ORC-1751: [C++] fix syntax error in ThirdpartyToolchain#1994
Closed
luffy-zh wants to merge 1 commit intoapache:mainfrom
Closed
ORC-1751: [C++] fix syntax error in ThirdpartyToolchain#1994luffy-zh wants to merge 1 commit intoapache:mainfrom
luffy-zh wants to merge 1 commit intoapache:mainfrom
Conversation
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Is this all we need, @luffy-zh ?
raulcd
approved these changes
Aug 6, 2024
Member
raulcd
left a comment
There was a problem hiding this comment.
This looks good to me. I think the underlying issue which I had to use this patch:
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index aa520ff..7bd75d1 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -416,6 +416,18 @@ endif ()
if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR ORC_PACKAGE_KIND STREQUAL "conan")
find_package (Protobuf REQUIRED)
set(PROTOBUF_VENDORED FALSE)
+ if (Protobuf_FOUND AND NOT PROTOBUF_STATIC_LIB)
+ get_target_property (target_type protobuf::libprotobuf TYPE)
+ if (target_type STREQUAL "STATIC_LIBRARY")
+ set(PROTOBUF_STATIC_LIB protobuf::libprotobuf)
+ endif ()
+ endif()
+ if (Protobuf_FOUND AND NOT PROTOC_STATIC_LIB)
+ get_target_property (target_type protobuf::libprotoc TYPE)
+ if (target_type STREQUAL "STATIC_LIBRARY")
+ set (PROTOC_STATIC_LIB protobuf::libprotoc)
+ endif ()
+ endif()
else ()
set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
set(PROTOBUF_INCLUDE_DIR "${PROTOBUF_PREFIX}/include")might have already been fixed as suggested by @kou at: #1963
Member
|
Merged to main. There exists a conflict on |
Contributor
Author
OK, I will make a backporting PR to branch-2.0 later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
fix syntax error in ThirdpartyToolchain
Why are the changes needed?
Handle the issue discussed here
How was this patch tested?
Test it locally
Was this patch authored or co-authored using generative AI tooling?
NO