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

build: Add support for find_package(Arrow REQUIRED) #12599

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kou
Copy link

@kou kou commented Mar 11, 2025

The current CMake/FindArrow.cmake ignores REQUIRED argument in
find_package(Arrow REQUIRED). If -DArrow_SOURCE=SYSTEM is
specified but system Arrow isn't found, FindArrow.cmake finishes
without an error.

With this change, -DArrow_SOURCE=SYSTEM and no system Arrow reports
an error.

find_package_handle_standard_args() is a standard function provided
by CMake to handle REQUIRED:
https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html

Our other FindXXX.cmakes also use it.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 11, 2025
Copy link

netlify bot commented Mar 11, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 9dd1dc6
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67d13f45376350000848217b

Copy link
Collaborator

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

Thanks for the clean up!

@kou kou force-pushed the error-on-system-arrow-not-found branch 3 times, most recently from a26e9f8 to 09b06c0 Compare March 11, 2025 21:30
set(Arrow_FOUND false)
return()
endif()
add_library(thrift ALIAS thrift::thrift)
Copy link
Author

Choose a reason for hiding this comment

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

Oh, sorry. I should not have removed this. I'll revert this change.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@kou kou force-pushed the error-on-system-arrow-not-found branch from 09b06c0 to 917b3fb Compare March 12, 2025 01:27
@kou
Copy link
Author

kou commented Mar 12, 2025

https://github.com/facebookincubator/velox/actions/runs/13801667804/job/38612026080?pr=12599#step:3:10

Incompatible changes in function signatures have been detected.

Function 'parse_duration' has been removed.

Changing or removing function signatures breaks backwards compatibility as some users may rely on function signatures that no longer exist.

In this PR, I didn't remove any function. Should I rebase on main?

@assignUser
Copy link
Collaborator

Yes I think that should fix it

The current `CMake/FindArrow.cmake` ignores `REQUIRED` argument in
`find_package(Arrow REQUIRED)`. If `-DArrow_SOURCE=SYSTEM` is
specified but system Arrow isn't found, `FindArrow.cmake` finishes
without an error.

With this change, `-DArrow_SOURCE=SYSTEM` and no system Arrow reports
an error.

`find_package_handle_standard_args()` is a standard function provided
by CMake to handle `REQUIRED`:
https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html

Our other `FindXXX.cmake`s also use it.
@kou kou force-pushed the error-on-system-arrow-not-found branch from 917b3fb to 9dd1dc6 Compare March 12, 2025 08:01
@kou
Copy link
Author

kou commented Mar 12, 2025

OK. I've rebased.

@assignUser
Copy link
Collaborator

https://github.com/facebookincubator/velox/actions/runs/13806404414/job/38618581225#step:9:607

👍

@assignUser assignUser added the ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants