You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/10/06 01:33:12 UTC
arrow git commit: ARROW-1541: [C++] Fix race conditions in arrow_gpu
with generated Flatbuffers files. Do not put generated files in source tree
Repository: arrow
Updated Branches:
refs/heads/master 3ae43551f -> f8cdafae4
ARROW-1541: [C++] Fix race conditions in arrow_gpu with generated Flatbuffers files. Do not put generated files in source tree
It's a better practice to put generated files in the build directory rather than in the main source tree. There was also a race condition with `arrow/gpu/cuda_version.h`, so fixed that also
Author: Wes McKinney <we...@twosigma.com>
Closes #1180 from wesm/ARROW-1541 and squashes the following commits:
1e95ecae [Wes McKinney] Put generated Flatbuffers sources in the binary dir rather than source dir. Fix race conditions in arrow_gpu build
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/f8cdafae
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/f8cdafae
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/f8cdafae
Branch: refs/heads/master
Commit: f8cdafae40e765cdb35ba9b8e330752325eabcd7
Parents: 3ae4355
Author: Wes McKinney <we...@twosigma.com>
Authored: Thu Oct 5 21:33:08 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Thu Oct 5 21:33:08 2017 -0400
----------------------------------------------------------------------
cpp/CMakeLists.txt | 2 ++
cpp/src/arrow/CMakeLists.txt | 13 +++++++------
cpp/src/arrow/gpu/CMakeLists.txt | 5 ++++-
cpp/src/arrow/ipc/.gitignore | 1 -
cpp/src/arrow/ipc/CMakeLists.txt | 2 +-
5 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/f8cdafae/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 0930ae4..212d1f5 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -332,6 +332,8 @@ set(LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}")
# where to put generated binaries
set(EXECUTABLE_OUTPUT_PATH "${BUILD_OUTPUT_ROOT_DIRECTORY}")
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
include_directories(src)
############################################################
http://git-wip-us.apache.org/repos/asf/arrow/blob/f8cdafae/cpp/src/arrow/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index 5c90331..9a67651 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -60,11 +60,6 @@ if (ARROW_GPU)
add_subdirectory(gpu)
endif()
-if (ARROW_IPC)
- add_subdirectory(ipc)
- add_dependencies(arrow_dependencies metadata_fbs)
-endif()
-
if (ARROW_WITH_BROTLI)
add_definitions(-DARROW_WITH_BROTLI)
SET(ARROW_SRCS util/compression_brotli.cc ${ARROW_SRCS})
@@ -98,7 +93,9 @@ if (NOT ARROW_BOOST_HEADER_ONLY)
endif()
if (ARROW_IPC)
- set(ARROW_SRCS ${ARROW_SRCS}
+ add_subdirectory(ipc)
+
+ set(ARROW_IPC_SRCS
ipc/dictionary.cc
ipc/feather.cc
ipc/json.cc
@@ -108,6 +105,10 @@ if (ARROW_IPC)
ipc/reader.cc
ipc/writer.cc
)
+ SET(ARROW_SRCS ${ARROW_SRCS}
+ ${ARROW_IPC_SRCS})
+
+ add_dependencies(arrow_dependencies metadata_fbs)
endif()
if(NOT APPLE AND NOT MSVC)
http://git-wip-us.apache.org/repos/asf/arrow/blob/f8cdafae/cpp/src/arrow/gpu/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt
index 176916e..c2f4233 100644
--- a/cpp/src/arrow/gpu/CMakeLists.txt
+++ b/cpp/src/arrow/gpu/CMakeLists.txt
@@ -32,6 +32,9 @@ set(ARROW_GPU_SRCS
cuda_memory.cc
)
+add_custom_target(arrow_gpu_sources DEPENDS ${ARROW_GPU_SRCS})
+add_dependencies(arrow_gpu_sources metadata_fbs)
+
set(ARROW_GPU_SHARED_LINK_LIBS
arrow_shared
${CUDA_LIBRARIES}
@@ -47,7 +50,7 @@ ADD_ARROW_LIB(arrow_gpu
# CUDA build version
configure_file(cuda_version.h.in
- "${CMAKE_CURRENT_SOURCE_DIR}/cuda_version.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/cuda_version.h"
@ONLY)
install(FILES
http://git-wip-us.apache.org/repos/asf/arrow/blob/f8cdafae/cpp/src/arrow/ipc/.gitignore
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/ipc/.gitignore b/cpp/src/arrow/ipc/.gitignore
deleted file mode 100644
index b2ddb05..0000000
--- a/cpp/src/arrow/ipc/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*_generated.h
http://git-wip-us.apache.org/repos/asf/arrow/blob/f8cdafae/cpp/src/arrow/ipc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt
index 9689970..a24349f 100644
--- a/cpp/src/arrow/ipc/CMakeLists.txt
+++ b/cpp/src/arrow/ipc/CMakeLists.txt
@@ -46,7 +46,7 @@ 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_SOURCE_DIR}/src/arrow/ipc)
+set(OUTPUT_DIR ${CMAKE_BINARY_DIR}/src/arrow/ipc)
set(FBS_OUTPUT_FILES
"${OUTPUT_DIR}/File_generated.h"
"${OUTPUT_DIR}/Message_generated.h"