zanmato1984 opened a new issue, #49164:
URL: https://github.com/apache/arrow/issues/49164
### Describe the enhancement requested
### Summary
When Arrow is added as a subproject (FetchContent + SOURCE_SUBDIR cpp),
CMake configuration fails in
`cpp/src/arrow/io/CMakeLists.txt:48`. The `if()` uses
`${ARROW_SIMD_LEVEL}` and crashes if the
variable is undefined, which happens because `ARROW_DEFINE_OPTIONS`
defaults to OFF for subprojects.
### Repro
Minimal CMakeLists.txt:
```
cmake_minimum_required(VERSION 3.20)
project(bundled-arrow-example LANGUAGES CXX)
include(FetchContent)
set(ARROW_BUILD_SHARED OFF CACHE BOOL "" FORCE)
set(ARROW_BUILD_STATIC ON CACHE BOOL "" FORCE)
set(ARROW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(ARROW_BUILD_UTILITIES OFF CACHE BOOL "" FORCE)
set(ARROW_COMPUTE OFF CACHE BOOL "" FORCE)
set(ARROW_ACERO OFF CACHE BOOL "" FORCE)
set(ARROW_DATASET OFF CACHE BOOL "" FORCE)
set(ARROW_IPC OFF CACHE BOOL "" FORCE)
set(ARROW_PARQUET OFF CACHE BOOL "" FORCE)
set(ARROW_VERSION "23.0.0")
FetchContent_Declare(
arrow
URL
https://github.com/apache/arrow/archive/refs/tags/apache-arrow-${ARROW_VERSION}.tar.gz
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(arrow)
```
Configure:
```
cmake -S . -B build
```
CMake fails with:
```
CMake Error at build/_deps/arrow-src/cpp/src/arrow/io/CMakeLists.txt:48 (if):
if given arguments:
"NOT" "(" "STREQUAL" "NONE" ")" "AND" "NOT" "(" "STREQUAL" "NEON" ")"
Unknown arguments specified
```
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]