apache / apache/arrow

[C++][CMake] Use cpp/src/arrow/util/config.h.cmake instead of add_defintions() for ARROW_WITH_${COMPRESESION}

Open
#14,906 1 comment 0 reactions 1 assignee Claimed by @kou View on GitHub
Component: C++ Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

### Describe the enhancement requested

For example, `ARROW_WITH_ZLIB`, `ARROW_WITH_ZSTD` and so on.

In general, we should not use `add_definitions()` in modern CMake because its scope is directory. Directory scope may introduce implicit unexpected definitions. We should use CMake target or something instead.

If we use `cpp/src/arrow/util/config.h.cmake`, Apache Arrow C++ users can also use `ARROW_WITH_${COMPRESSION}`.

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.