[ 
https://issues.apache.org/jira/browse/ARROW-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16742495#comment-16742495
 ] 

Wes McKinney commented on ARROW-4261:
-------------------------------------

Interested in opinions of [~xhochy] and [~pitrou]. I can see the argument for 
using {{add_subdirectory}} which would import 100% of targets and variables 
into a CMake project. I think it's OK to have small fixes to enable that to 
work in some use cases, but in general that is not going to be the recommended 
way to include Arrow in another CMake project

> [C++] CMake paths for IPC, Flight, Thrift, and Plasma don't support using 
> Arrow as a subproject
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARROW-4261
>                 URL: https://issues.apache.org/jira/browse/ARROW-4261
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Michael Vilim
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.13.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to