-
Notifications
You must be signed in to change notification settings - Fork 451
Set RERUN_ARROW_LINK_SHARED_DEFAULT
based on found Arrow build
#9550
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
Merged
Conversation
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
…ly built with. Arrow provides a ArrowOptions.cmake its package includes, with the following: ```cmake ### Build static libraries set(ARROW_BUILD_STATIC "0") ### Build shared libraries set(ARROW_BUILD_SHARED "1") ``` (It is generated by https://github.com/apache/arrow/blob/d8d7e79b60092f643f16b045eaff0b4359e32bae/cpp/cmake_modules/DefineOptions.cmake#L745 ) This is why vcpkg suggests handling Arrow by listening to that value: ```console The package arrow provides CMake targets: find_package(Arrow CONFIG REQUIRED) target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>") ``` This PR tests ARROW_BUILD_SHARED just in case older versions of Arrow I can't test with didn't define these variables; in that case `if (ARROW_BUILD_SHARED)` will choose the else branch and give the same behavior as before the edit (OFF).
BillyONeal
added a commit
to BillyONeal/vcpkg
that referenced
this pull request
Apr 8, 2025
Incorporates rerun-io/rerun#9548 and rerun-io/rerun#9550 After these changes I tested that it built OK with https://github.com/rerun-io/rerun/blob/main/examples/cpp/minimal/main.cpp : ``` C:\Dev\test>dir Volume in drive C is OS Volume Serial Number is 9288-8F79 Directory of C:\Dev\test 04/08/2025 10:42 AM <DIR> . 04/08/2025 10:40 AM <DIR> .. 04/08/2025 10:38 AM 180 CMakeLists.txt 04/08/2025 10:37 AM 756 main.cpp 2 File(s) 936 bytes 2 Dir(s) 4,813,367,603,200 bytes free C:\Dev\test>type CMakeLists.txt cmake_minimum_required(VERSION 3.10) project(HelloWorld) add_executable(main main.cpp) find_package(rerun_sdk CONFIG REQUIRED) target_link_libraries(main PRIVATE rerun_sdk) C:\Dev\test>type main.cpp #include <rerun.hpp> #include <rerun/demo_utils.hpp> using rerun::demo::grid3d; int main() { // Create a new `RecordingStream` which sends data over gRPC to the viewer process. const auto rec = rerun::RecordingStream("rerun_example_cpp"); // Try to spawn a new viewer instance. rec.spawn().exit_on_failure(); // Create some data using the `grid` utility function. std::vector<rerun::Position3D> points = grid3d<rerun::Position3D, float>(-10.f, 10.f, 10); std::vector<rerun::Color> colors = grid3d<rerun::Color, uint8_t>(0, 255, 10); // Log the "my_points" entity with our data, using the `Points3D` archetype. rec.log("my_points", rerun::Points3D(points).with_colors(colors).with_radii({0.5f})); } ```
This was referenced Apr 8, 2025
emilk
approved these changes
Apr 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Thanks for the PR
RERUN_ARROW_LINK_SHARED_DEFAULT
based on found Arrow build
CI failures are because of: |
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.
Arrow provides an
ArrowOptions.cmake
in its package includes, with the following:(It is generated by https://github.com/apache/arrow/blob/d8d7e79b60092f643f16b045eaff0b4359e32bae/cpp/cmake_modules/DefineOptions.cmake#L745 )
This is why vcpkg suggests handling Arrow by listening to that value:
This PR tests
ARROW_BUILD_SHARED
just in case older versions of Arrow I can't test with didn't define these variables. In that case,ARROW_BUILD_SHARED
is undefined, soif (ARROW_BUILD_SHARED)
will choose the else branch, and give the same behavior as before the edit (OFF
).