Skip to content

[C++] Comments in FindArrow.cmake misleading #25276

@asfimport

Description

@asfimport

When you try to find out how to use Arrow from a third-party project, you may read the comments in FindArrow.cmake:

# This module defines
#  ARROW_FOUND, whether Arrow has been found
#  ARROW_FULL_SO_VERSION, full shared object version of found Arrow "100.0.0"
#  ARROW_IMPORT_LIB, path to libarrow's import library (Windows only)
#  ARROW_INCLUDE_DIR, directory containing headers
#  ARROW_LIBS, deprecated. Use ARROW_LIB_DIR instead
#  ARROW_LIB_DIR, directory containing Arrow libraries
#  ARROW_SHARED_IMP_LIB, deprecated. Use ARROW_IMPORT_LIB instead
#  ARROW_SHARED_LIB, path to libarrow's shared library
#  ARROW_SO_VERSION, shared object version of found Arrow such as "100"
#  ARROW_STATIC_LIB, path to libarrow.a
#  ARROW_VERSION, version of found Arrow
#  ARROW_VERSION_MAJOR, major version of found Arrow
#  ARROW_VERSION_MINOR, minor version of found Arrow
#  ARROW_VERSION_PATCH, patch version of found Arrow

... only to find out that find_package(Arrow) doesn't set most of those variables:

  • it sets Arrow_FOUND, not ARROW_FOUND

  • ARROW_INCLUDE_DIR, ARROW_SHARED_LIB, ARROW_STATIC_LIB are not set

  • to link with Arrow C++, you have to link with either arrow_shared or arrow_static

    Also, I wonder if Arrow should follow the more recent convention of naming its targets e.g. Arrow::Arrow or arrow::arrow (or specifically arrow::shared).

Reporter: Antoine Pitrou / @pitrou
Assignee: Kouhei Sutou / @kou

Related issues:

Note: This issue was originally created as ARROW-9171. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions