[C++][CMake] Use cpp/src/arrow/util/config.h.cmake instead of add_defintions() for ARROW_WITH_${COMPRESESION}
Open
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
Assessment
This issue has not been assessed yet.