Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-4261

[C++] CMake paths for IPC, Flight, Thrift, and Plasma don't support using Arrow as a subproject

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.13.0
    • C++

    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

          Activity

            People

              mvilim Michael Vilim
              mvilim Michael Vilim
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m