You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2019/01/18 09:21:36 UTC

[arrow] branch master updated: ARROW-4261: [C++] Make CMake paths for IPC, Flight, Thrift, and Plasma subproject compatible

This is an automated email from the ASF dual-hosted git repository.

uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new f3cd36a  ARROW-4261: [C++] Make CMake paths for IPC, Flight, Thrift, and Plasma subproject compatible
f3cd36a is described below

commit f3cd36a7755f6a869125894e9c5e8a14fd1323de
Author: Michael Vilim <mi...@gmail.com>
AuthorDate: Fri Jan 18 10:21:26 2019 +0100

    ARROW-4261: [C++] Make CMake paths for IPC, Flight, Thrift, and Plasma subproject compatible
    
    Pull request for https://issues.apache.org/jira/browse/ARROW-4261
    
    Author: Michael Vilim <mi...@gmail.com>
    
    Closes #3396 from mvilim/arrow_4261 and squashes the following commits:
    
    08b11a15 <Michael Vilim> ARROW-4261:  Make CMake paths for IPC, Flight, Thrift, and Plasma subproject compatible
---
 cpp/CMakeLists.txt                                  |  2 ++
 cpp/src/arrow/dbi/hiveserver2/thrift/CMakeLists.txt |  2 +-
 cpp/src/arrow/flight/CMakeLists.txt                 |  4 ++--
 cpp/src/arrow/ipc/CMakeLists.txt                    | 10 +++++-----
 cpp/src/plasma/CMakeLists.txt                       |  2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 08868af..7f9a779 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -47,6 +47,8 @@ message(STATUS "Arrow version: "
   "${ARROW_VERSION_MAJOR}.${ARROW_VERSION_MINOR}.${ARROW_VERSION_PATCH} "
   "(full: '${ARROW_VERSION}')")
 
+set(ARROW_SOURCE_DIR ${PROJECT_SOURCE_DIR})
+set(ARROW_BINARY_DIR ${PROJECT_BINARY_DIR})
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
 
diff --git a/cpp/src/arrow/dbi/hiveserver2/thrift/CMakeLists.txt b/cpp/src/arrow/dbi/hiveserver2/thrift/CMakeLists.txt
index be689f9..ed90fe8 100644
--- a/cpp/src/arrow/dbi/hiveserver2/thrift/CMakeLists.txt
+++ b/cpp/src/arrow/dbi/hiveserver2/thrift/CMakeLists.txt
@@ -78,7 +78,7 @@ endfunction(HS2_THRIFT_GEN)
 
 message("Using Thrift compiler: ${THRIFT_COMPILER}")
 
-set(OUTPUT_DIR ${CMAKE_BINARY_DIR}/src)
+set(OUTPUT_DIR ${ARROW_BINARY_DIR}/src)
 file(MAKE_DIRECTORY ${OUTPUT_DIR})
 
 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ErrorCodes.thrift
diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt
index 2feaee1..db2092e 100644
--- a/cpp/src/arrow/flight/CMakeLists.txt
+++ b/cpp/src/arrow/flight/CMakeLists.txt
@@ -29,8 +29,8 @@ SET(ARROW_FLIGHT_STATIC_LINK_LIBS
 
 # TODO(wesm): Protobuf shared vs static linking
 
-set(FLIGHT_PROTO_PATH "${CMAKE_SOURCE_DIR}/../format")
-set(FLIGHT_PROTO ${CMAKE_SOURCE_DIR}/../format/Flight.proto)
+set(FLIGHT_PROTO_PATH "${ARROW_SOURCE_DIR}/../format")
+set(FLIGHT_PROTO ${ARROW_SOURCE_DIR}/../format/Flight.proto)
 
 set(FLIGHT_GENERATED_PROTO_FILES
   "${CMAKE_CURRENT_BINARY_DIR}/Flight.pb.cc"
diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt
index 422e72e..7967582 100644
--- a/cpp/src/arrow/ipc/CMakeLists.txt
+++ b/cpp/src/arrow/ipc/CMakeLists.txt
@@ -53,17 +53,17 @@ set_source_files_properties(Message_generated.h PROPERTIES GENERATED TRUE)
 set_source_files_properties(feather_generated.h PROPERTIES GENERATED TRUE)
 set_source_files_properties(File_generated.h PROPERTIES GENERATED TRUE)
 
-set(OUTPUT_DIR ${CMAKE_BINARY_DIR}/src/arrow/ipc)
+set(OUTPUT_DIR ${ARROW_BINARY_DIR}/src/arrow/ipc)
 set(FBS_OUTPUT_FILES
   "${OUTPUT_DIR}/File_generated.h"
   "${OUTPUT_DIR}/Message_generated.h"
   "${OUTPUT_DIR}/feather_generated.h")
 
 set(FBS_SRC
-  ${CMAKE_SOURCE_DIR}/../format/Message.fbs
-  ${CMAKE_SOURCE_DIR}/../format/File.fbs
-  ${CMAKE_SOURCE_DIR}/../format/Schema.fbs
-  ${CMAKE_SOURCE_DIR}/../format/Tensor.fbs
+  ${ARROW_SOURCE_DIR}/../format/Message.fbs
+  ${ARROW_SOURCE_DIR}/../format/File.fbs
+  ${ARROW_SOURCE_DIR}/../format/Schema.fbs
+  ${ARROW_SOURCE_DIR}/../format/Tensor.fbs
   ${CMAKE_CURRENT_SOURCE_DIR}/feather.fbs)
 
 foreach(FIL ${FBS_SRC})
diff --git a/cpp/src/plasma/CMakeLists.txt b/cpp/src/plasma/CMakeLists.txt
index 2be5740..f4a90ef 100644
--- a/cpp/src/plasma/CMakeLists.txt
+++ b/cpp/src/plasma/CMakeLists.txt
@@ -40,7 +40,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-conversion")
 # Compile flatbuffers
 
 set(PLASMA_FBS_SRC "${CMAKE_CURRENT_LIST_DIR}/format/plasma.fbs" "${CMAKE_CURRENT_LIST_DIR}/format/common.fbs")
-set(OUTPUT_DIR ${CMAKE_BINARY_DIR}/src/plasma)
+set(OUTPUT_DIR ${ARROW_BINARY_DIR}/src/plasma)
 
 set(PLASMA_FBS_OUTPUT_FILES
   "${OUTPUT_DIR}/common_generated.h"