Skip to content

Conversation

kou
Copy link
Contributor

@kou kou commented Sep 11, 2025

Fixes #14760

It's needed for old CMake such as CMake 3.16. CMake 3.18 or later can create an alias CMake target for non-GLOBAL CMake target:

https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries

Added in version 3.18: An ALIAS can target a non-GLOBAL Imported
Target. Such alias is scoped to the directory in which it is created
and below. The ALIAS_GLOBAL target property can be used to check if
the alias is global or not.

Now, we require CMake 3.28 or later. So we can remove the gflags_gflags workaround.

I confirmed that this change works with Presto C++.

It's needed for old CMake such as CMake 3.16. CMake 3.18 or later can
create an alias CMake target for non-`GLOBAL` CMake target:

https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries

> Added in version 3.18: An ALIAS can target a non-GLOBAL Imported
> Target. Such alias is scoped to the directory in which it is created
> and below. The ALIAS_GLOBAL target property can be used to check if
> the alias is global or not.

Now, we require CMake 3.28 or later. So we can remove the
`gflags_gflags` workaround.

I confirmed that this change works with Presto C++.
@kou kou requested a review from majetideepak as a code owner September 11, 2025 07:20
Copy link

netlify bot commented Sep 11, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit fc1a37b
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/68c2783c2159d90008cc533a

@meta-cla meta-cla 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 Sep 11, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve GFlags CMake target handling
1 participant