Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
Builds using Arrow as a CMake subproject (using add_subdirectory) will fail if the IPC, Flight, Thrift, or Plasma features are turned on. This issue is caused by the use of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR which point to the top level directories of the CMake project (source and output, respectively).
In most of the cases where these paths are used, they are intended to point to the Arrow source and build dirs. Defining and using CMake variables for those top level Arrow folders solves the issue.
I will open a pull request to fix the issue.
A project that demonstrates the issue and the patch can be found here: https://github.com/mvilim/arrow-as-subproject
Note: there are several other locations in the repo where CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR are used (outside of the main cpp build, the cmake_modules, and the Gandiva subproject, for example). I hesitate to change these without an easy way to test all the possible build paths. I choosing a safe route here and changing only the most straightforward ones (and ones most likely to be used with Arrow as a subproject). If you would prefer I try to change all uses of these variables, let me know (and let me know if you have a straightforward way to test the supported build configurations).
Attachments
Issue Links
- links to