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: Move resolve dependency macros under velox_ prefix #11392

Closed

Conversation

cryos
Copy link
Contributor

@cryos cryos commented Oct 30, 2024

It is best practice in CMake to use a project prefix for project specific macros, functions and variables. This makes it easier to compose projects in larger builds as well as differentiate general functions from project specific functions.

This moves several macros and it will require some simple migration of any CMake code reusing the resolve dependency macros:

  • build_dependency -> velox_build_dependency
  • list_subdirs -> removed after reviewer suggestion
  • resolve_dependency -> velox_resolve_dependency
  • resolve_dependency_url -> velox_resolve_dependency_url
  • set_source -> velox_set_source
  • set_with_default -> velox_set_with_default

This should be a simple change as the other changes are just to adapt to the changed macro names.

@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 Oct 30, 2024
Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 6a83ba3
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/672ccc148e3f0f0008483df4

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.

Yeah good idea, thanks. I can see issues when getting arrow via fetch content without the prefix (arrow has 'resolve_dependency' as well).

Before we merge we will need to ping some people of the downstream projects I know are using our CMake that will need to adapt to this.

Nimble @pedro
Presto @majetideepak
Not sure who to ping for gluten?

Edit: velox_exec_test is failing on main.

Copy link
Contributor

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

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

This pr makes sense. @assignUser, I just checked Gluten. It only requires few code changes to adapt to this. We will do that in Gluten after this pr is merged.

CMake/ResolveDependency.cmake Outdated Show resolved Hide resolved
@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 Oct 31, 2024
@mbasmanova
Copy link
Contributor

@cryos CI is red. Would you rebase to see if CI passes. If not, please, investigate the failures.

@cryos cryos force-pushed the cmake-namespace-resolve-deps branch from 014b6d0 to c5f06ba Compare November 4, 2024 15:57
@cryos
Copy link
Contributor Author

cryos commented Nov 4, 2024

@cryos CI is red. Would you rebase to see if CI passes. If not, please, investigate the failures.

Rebasing didn't help, I don't see anything related to this change in the test that is failing. The same test appears to be failing on other unrelated PRs that are active right now too. Anything related to this PR should fail early as it is all related to finding/building dependencies and linking to them.

Maybe @assignUser will have a better overview, it would appear that it is seeing an empty file.

@assignUser
Copy link
Collaborator

It's been fixed on main now: #11436

cryos added 3 commits November 7, 2024 09:17
It is best practice in CMake to use a project prefix for project
specific macros, functions and variasbles. This makes it easier to
compose projects in larger builds as well as differentiate general
functions from project specific functions.

This moves several macros and it will require some simple migration of
any CMake code reusing the resolve dependency macros:

 * build_dependency -> velox_build_dependency
 * list_subdirs -> velox_list_subdirs
 * resolve_dependency -> velox_resolve_dependency
 * resolve_dependency_url -> velox_resolve_dependency_url
 * set_source -> velox_set_source
 * set_with_default -> velox_set_with_default
This is not used and in review it was suggested that we remove it.
@cryos cryos force-pushed the cmake-namespace-resolve-deps branch from c5f06ba to 6a83ba3 Compare November 7, 2024 14:17
@cryos
Copy link
Contributor Author

cryos commented Nov 7, 2024

Everything looks green now.

@assignUser
Copy link
Collaborator

@mbasmanova can we merge this before something else causes conflicts?

@mbasmanova
Copy link
Contributor

@kevinwilfong Kevin, would you help merge this PR?

@facebook-github-bot
Copy link
Contributor

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@kgpai merged this pull request in dfc737d.

Copy link

Conbench analyzed the 1 benchmark run on commit dfc737d7.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

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. Merged 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.

5 participants