Skip to content

Commit

Permalink
Merge pull request apache#40 from zhouyuan/rename_dataset_proto_file
Browse files Browse the repository at this point in the history
[C++] rename proto file for dataset
  • Loading branch information
zhouyuan authored May 7, 2020
2 parents 7303bcb + 967c5c6 commit 7fed75a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions cpp/src/jni/dataset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ set(ARROW_BUILD_STATIC OFF)

set(ARROW_DATASET_JNI_LIBS arrow_dataset_static ${ARROW_PROTOBUF_LIBPROTOBUF})
set(PROTO_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(PROTO_OUTPUT_FILES "${PROTO_OUTPUT_DIR}/Types.pb.cc")
set(PROTO_OUTPUT_FILES ${PROTO_OUTPUT_FILES} "${PROTO_OUTPUT_DIR}/Types.pb.h")
set(PROTO_OUTPUT_FILES "${PROTO_OUTPUT_DIR}/DTypes.pb.cc")
set(PROTO_OUTPUT_FILES ${PROTO_OUTPUT_FILES} "${PROTO_OUTPUT_DIR}/DTypes.pb.h")

set_source_files_properties(${PROTO_OUTPUT_FILES} PROPERTIES GENERATED TRUE)

get_filename_component(ABS_ARROW_DATASET_PROTO ${CMAKE_SOURCE_DIR}/src/jni/dataset/proto/Types.proto
get_filename_component(ABS_ARROW_DATASET_PROTO ${CMAKE_SOURCE_DIR}/src/jni/dataset/proto/DTypes.proto
ABSOLUTE)

add_custom_command(OUTPUT ${PROTO_OUTPUT_FILES}
Expand All @@ -49,17 +49,17 @@ add_custom_command(OUTPUT ${PROTO_OUTPUT_FILES}
${CMAKE_SOURCE_DIR}/src/jni/dataset/proto
--cpp_out
${PROTO_OUTPUT_DIR}
${CMAKE_SOURCE_DIR}/src/jni/dataset/proto/Types.proto
${CMAKE_SOURCE_DIR}/src/jni/dataset/proto/DTypes.proto
DEPENDS ${ABS_ARROW_DATASET_PROTO} protobuf::libprotobuf
COMMENT "Running PROTO compiler on Types.proto"
COMMENT "Running PROTO compiler on DTypes.proto"
VERBATIM)

add_custom_target(arrow_dataset_jni_proto ALL DEPENDS ${PROTO_OUTPUT_FILES})

set(PROTO_SRCS
"${PROTO_OUTPUT_DIR}/Types.pb.cc")
"${PROTO_OUTPUT_DIR}/DTypes.pb.cc")

set(PROTO_HDRS "${PROTO_OUTPUT_DIR}/Types.pb.h")
set(PROTO_HDRS "${PROTO_OUTPUT_DIR}/DTypes.pb.h")


set(ARROW_DATASET_JNI_SOURCES jni_wrapper.cpp ${PROTO_SRCS})
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/jni/dataset/jni_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "arrow/compute/kernel.h"
#include "arrow/compute/kernels/cast.h"
#include "arrow/compute/kernels/compare.h"
#include "jni/dataset/Types.pb.h"
#include "jni/dataset/DTypes.pb.h"

#include "org_apache_arrow_dataset_jni_JniWrapper.h"
#include "org_apache_arrow_dataset_file_JniWrapper.h"
Expand Down Expand Up @@ -574,4 +574,4 @@ JNIEXPORT jlong JNICALL Java_org_apache_arrow_dataset_file_JniWrapper_makeSingle
JNI_ASSIGN_OR_THROW(std::shared_ptr<arrow::dataset::DatasetFactory> d,
arrow::dataset::SingleFileDatasetFactory::Make(out_path, fs, file_format))
return dataset_factory_holder_.Insert(d);
}
}
File renamed without changes.

0 comments on commit 7fed75a

Please sign in to comment.