Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit 00a1f22

Browse files
author
xieqi
authored
[POAE7-2934] Merge cider plan/processor to single cider_static library (#433)
* [POAE7-2934] Merge cider plan/processor to single cider_static library * fix build * fix presto build
1 parent 3ad360c commit 00a1f22

39 files changed

+329
-299
lines changed

ci/scripts/build-presto-package.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,12 @@ cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/libvelox_plugin.a ./p
6363
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/ciderTransformer/libcider_plan_transformer.a ./presto_cpp/main/lib
6464
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/planTransformer/libvelox_plan_transformer.a ./presto_cpp/main/lib
6565
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/substrait/libvelox_substrait_convertor.a ./presto_cpp/main/lib
66-
cp -a ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/module/libcider.so* ./presto_cpp/main/lib
67-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/processor/libcider_processor.a ./presto_cpp/main/lib
68-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/substrait/libcider_plan_substrait.a ./presto_cpp/main/lib
6966
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/velox/velox/substrait/libvelox_substrait_plan_converter.a ./presto_cpp/main/lib
7067
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/template/libQueryEngine.a ./presto_cpp/main/lib
7168
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/function/libcider_function.so ./presto_cpp/main/lib
7269
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/nextgen/jitlib/libjitlib.a ./presto_cpp/main/lib
7370
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/nextgen/libnextgen.a ./presto_cpp/main/lib
74-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/parser/libcider_plan_parser.a ./presto_cpp/main/lib
75-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/lookup/libcider_func_lkup.a ./presto_cpp/main/lib
76-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/common/libsubstrait_common.a ./presto_cpp/main/lib
77-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/function/libsubstrait_function.a ./presto_cpp/main/lib
78-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/type/libsubstrait_type.a ./presto_cpp/main/lib
79-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/third_party/yaml-cpp/libyaml-cpp.a ./presto_cpp/main/lib
80-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/util/libcider_util.a ./presto_cpp/main/lib
81-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/type/plan/libcider_type_plan.a ./presto_cpp/main/lib
71+
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/libcider_static.a ./presto_cpp/main/lib
8272

8373
make -j ${CPU_COUNT:-`nproc`} PRESTO_ENABLE_PARQUET=ON VELOX_ENABLE_HDFS=ON ${PRESTO_CPP_MODE}
8474
mkdir -p ./_build/${PRESTO_CPP_MODE}/presto_cpp/function

ci/scripts/integrate-presto-bdtk.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,13 @@ cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider-velox/src/libvelo
4949
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider-velox/src/ciderTransformer/libcider_plan_transformer.a ${WORKER_DIR}/presto_cpp/main/lib
5050
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider-velox/src/planTransformer/libvelox_plan_transformer.a ${WORKER_DIR}/presto_cpp/main/lib
5151
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider-velox/src/substrait/libvelox_substrait_convertor.a ${WORKER_DIR}/presto_cpp/main/lib
52-
cp -a ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/module/libcider.so* ${WORKER_DIR}/presto_cpp/main/lib
53-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/processor/libcider_processor.a ${WORKER_DIR}/presto_cpp/main/lib
54-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/plan/substrait/libcider_plan_substrait.a ${WORKER_DIR}/presto_cpp/main/lib
5552
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/thirdparty/velox/velox/substrait/libvelox_substrait_plan_converter.a ${WORKER_DIR}/presto_cpp/main/lib
5653
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/template/libQueryEngine.a ${WORKER_DIR}/presto_cpp/main/lib
5754
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/function/libcider_function.so ${WORKER_DIR}/presto_cpp/main/lib
5855
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/nextgen/jitlib/libjitlib.a ${WORKER_DIR}/presto_cpp/main/lib
5956
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/nextgen/libnextgen.a ${WORKER_DIR}/presto_cpp/main/lib
60-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/plan/parser/libcider_plan_parser.a ${WORKER_DIR}/presto_cpp/main/lib
61-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/exec/plan/lookup/libcider_func_lkup.a ${WORKER_DIR}/presto_cpp/main/lib
62-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/common/libsubstrait_common.a ${WORKER_DIR}/presto_cpp/main/lib
63-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/function/libsubstrait_function.a ${WORKER_DIR}/presto_cpp/main/lib
64-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/type/libsubstrait_type.a ${WORKER_DIR}/presto_cpp/main/lib
65-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/third_party/yaml-cpp/libyaml-cpp.a ${WORKER_DIR}/presto_cpp/main/lib
66-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/util/libcider_util.a ${WORKER_DIR}/presto_cpp/main/lib
67-
cp ${WORKER_DIR}/BDTK/build-${VELOX_PLUGIN_MODE}/cpp/src/cider/type/plan/libcider_type_plan.a ${WORKER_DIR}/presto_cpp/main/lib
57+
cp ${WORKER_DIR}/BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/function/libcider_runtime_function.so ${WORKER_DIR}/presto_cpp/main/lib
58+
cp ${WORKER_DIR}/BDTK/build-${BDTK_BUILD_MODE}/cpp/libcider_static.a ${WORKER_DIR}/presto_cpp/main/lib
6859

6960

7061
make -j ${CPU_COUNT:-`nproc`} PRESTO_ENABLE_PARQUET=ON ${PRESTO_CPP_MODE}

ci/scripts/presto-bdtk-67b3bf.patch

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/presto-native-execution/CMakeLists.txt b/presto-native-execution/CMakeLists.txt
2-
index 4eadf42..6b5972e 100644
2+
index 4eadf42a7e..6b5972e128 100644
33
--- a/presto-native-execution/CMakeLists.txt
44
+++ b/presto-native-execution/CMakeLists.txt
55
@@ -58,6 +58,10 @@ if(PRESTO_ENABLE_PARQUET)
@@ -14,7 +14,7 @@ index 4eadf42..6b5972e 100644
1414
OFF
1515
CACHE BOOL "Enable Velox tests")
1616
diff --git a/presto-native-execution/Makefile b/presto-native-execution/Makefile
17-
index be98b34..e5580ae 100644
17+
index be98b34c54..e5580ae10b 100644
1818
--- a/presto-native-execution/Makefile
1919
+++ b/presto-native-execution/Makefile
2020
@@ -21,12 +21,14 @@ CPU_TARGET ?= "avx"
@@ -42,7 +42,7 @@ index be98b34..e5580ae 100644
4242

4343
build: #: Build the software based in BUILD_DIR and BUILD_TYPE variables
4444
diff --git a/presto-native-execution/presto_cpp/main/CMakeLists.txt b/presto-native-execution/presto_cpp/main/CMakeLists.txt
45-
index 1ade5b2..04fe82a 100644
45+
index 1ade5b20e4..bf3acd8352 100644
4646
--- a/presto-native-execution/presto_cpp/main/CMakeLists.txt
4747
+++ b/presto-native-execution/presto_cpp/main/CMakeLists.txt
4848
@@ -16,6 +16,8 @@ add_subdirectory(common)
@@ -54,7 +54,7 @@ index 1ade5b2..04fe82a 100644
5454
add_library(
5555
presto_server_lib
5656
Announcer.cpp
57-
@@ -29,6 +31,36 @@ add_library(
57+
@@ -29,6 +31,26 @@ add_library(
5858
TaskManager.cpp
5959
TaskResource.cpp)
6060

@@ -68,36 +68,27 @@ index 1ade5b2..04fe82a 100644
6868
+ velox_exec_test_lib
6969
+ velox_plan_transformer
7070
+ velox_arrow_bridge
71-
+ cider
71+
+ cider_static
7272
+ cider_function
73-
+ cider_processor
74-
+ cider_plan_substrait
75-
+ cider_plan_parser
7673
+ nextgen
7774
+ jitlib
7875
+ cider_runtime_function
79-
+ cider_func_lkup
8076
+ LLVM
81-
+ substrait_common
82-
+ substrait_function
83-
+ substrait_type
84-
+ yaml-cpp
85-
+ cider_util
8677
+ QueryEngine
87-
+ yaml-cpp
8878
+ tbb
8979
+)
9080
+
9181
add_dependencies(presto_server_lib presto_protocol presto_types
9282
presto_thrift-cpp2 presto_thrift_extra)
9383

94-
@@ -61,7 +93,13 @@ target_link_libraries(
84+
@@ -61,7 +83,14 @@ target_link_libraries(
9585
${ANTLR4_RUNTIME}
9686
${GLOG}
9787
${GFLAGS_LIBRARIES}
9888
- pthread)
9989
+ pthread
10090
+ ${CIDER_VELOX_LIB}
91+
+ cider_static
10192
+ )
10293
+
10394
+if(VELOX_ENABLE_HDFS)
@@ -106,7 +97,7 @@ index 1ade5b2..04fe82a 100644
10697

10798
add_executable(presto_server PrestoMain.cpp)
10899

109-
@@ -79,6 +117,6 @@ if(PRESTO_ENABLE_PARQUET)
100+
@@ -79,6 +108,6 @@ if(PRESTO_ENABLE_PARQUET)
110101
target_link_libraries(presto_server velox_dwio_parquet_reader)
111102
endif()
112103

@@ -117,7 +108,7 @@ index 1ade5b2..04fe82a 100644
117108
+# add_subdirectory(tests)
118109
+# endif()
119110
diff --git a/presto-native-execution/presto_cpp/main/PrestoServer.cpp b/presto-native-execution/presto_cpp/main/PrestoServer.cpp
120-
index 8433765..c5787c0 100644
111+
index 8433765d7d..c5787c0d3f 100644
121112
--- a/presto-native-execution/presto_cpp/main/PrestoServer.cpp
122113
+++ b/presto-native-execution/presto_cpp/main/PrestoServer.cpp
123114
@@ -40,6 +40,7 @@
@@ -144,7 +135,7 @@ index 8433765..c5787c0 100644
144135
systemConfig->values(), nodeConfig->values());
145136
taskManager_->setBaseUri(fmt::format(kBaseUriFormat, address_, servicePort));
146137
diff --git a/presto-native-execution/presto_cpp/main/TaskResource.cpp b/presto-native-execution/presto_cpp/main/TaskResource.cpp
147-
index 05d83ff..ca5ff17 100644
138+
index 05d83ffea0..ca5ff17e16 100644
148139
--- a/presto-native-execution/presto_cpp/main/TaskResource.cpp
149140
+++ b/presto-native-execution/presto_cpp/main/TaskResource.cpp
150141
@@ -21,6 +21,9 @@
@@ -170,7 +161,7 @@ index 05d83ff..ca5ff17 100644
170161
const auto& session = taskUpdateRequest.session;
171162
auto configs = std::unordered_map<std::string, std::string>(
172163
diff --git a/presto-native-execution/presto_cpp/main/TaskResource.h b/presto-native-execution/presto_cpp/main/TaskResource.h
173-
index fc1e6cc..c1cde3c 100644
164+
index fc1e6cc78e..c1cde3c438 100644
174165
--- a/presto-native-execution/presto_cpp/main/TaskResource.h
175166
+++ b/presto-native-execution/presto_cpp/main/TaskResource.h
176167
@@ -17,6 +17,8 @@
@@ -183,7 +174,7 @@ index fc1e6cc..c1cde3c 100644
183174

184175
class TaskResource {
185176
diff --git a/presto-native-execution/presto_cpp/main/common/Configs.cpp b/presto-native-execution/presto_cpp/main/common/Configs.cpp
186-
index 86c9eab..124a866 100644
177+
index 86c9eabd6c..124a866832 100644
187178
--- a/presto-native-execution/presto_cpp/main/common/Configs.cpp
188179
+++ b/presto-native-execution/presto_cpp/main/common/Configs.cpp
189180
@@ -52,6 +52,10 @@ std::string SystemConfig::discoveryUri() const {
@@ -198,7 +189,7 @@ index 86c9eab..124a866 100644
198189
auto opt = optionalProperty<int32_t>(std::string(kMaxDriversPerTask));
199190
if (opt.has_value()) {
200191
diff --git a/presto-native-execution/presto_cpp/main/common/Configs.h b/presto-native-execution/presto_cpp/main/common/Configs.h
201-
index 6127e04..b2ea974 100644
192+
index 6127e049ed..b2ea974e0f 100644
202193
--- a/presto-native-execution/presto_cpp/main/common/Configs.h
203194
+++ b/presto-native-execution/presto_cpp/main/common/Configs.h
204195
@@ -77,6 +77,7 @@ class SystemConfig : public ConfigBase {
@@ -219,7 +210,7 @@ index 6127e04..b2ea974 100644
219210

220211
int32_t concurrentLifespansPerTask() const;
221212
diff --git a/presto-native-execution/presto_cpp/main/connectors/hive/storage_adapters/FileSystems.cpp b/presto-native-execution/presto_cpp/main/connectors/hive/storage_adapters/FileSystems.cpp
222-
index 98fcbcc..c2031ea 100644
213+
index 98fcbcc69d..c2031ea54f 100644
223214
--- a/presto-native-execution/presto_cpp/main/connectors/hive/storage_adapters/FileSystems.cpp
224215
+++ b/presto-native-execution/presto_cpp/main/connectors/hive/storage_adapters/FileSystems.cpp
225216
@@ -18,12 +18,19 @@
@@ -243,7 +234,7 @@ index 98fcbcc..c2031ea 100644
243234

244235
} // namespace facebook::presto
245236
diff --git a/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp b/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp
246-
index ac43dd5..c8c480f 100644
237+
index ac43dd58da..c8c480f32c 100644
247238
--- a/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp
248239
+++ b/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp
249240
@@ -582,9 +582,9 @@ std::shared_ptr<connector::ConnectorTableHandle> toConnectorTableHandle(
@@ -259,3 +250,10 @@ index ac43dd5..c8c480f 100644
259250

260251
for (const auto& entry : hiveLayout->partitionColumns) {
261252
partitionColumns.emplace(entry.name, toColumnHandle(&entry));
253+
diff --git a/presto-native-execution/velox b/presto-native-execution/velox
254+
index 20363e1d9b..77bfd1cf42 160000
255+
--- a/presto-native-execution/velox
256+
+++ b/presto-native-execution/velox
257+
@@ -1 +1 @@
258+
-Subproject commit 20363e1d9b275181dca1122de40cee7394c5fca5
259+
+Subproject commit 77bfd1cf42b10ce56a03fd094b16acaf61f932d2-dirty

ci/scripts/presto-integration.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,13 @@ cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/libvelox_plugin.a ./p
3737
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/ciderTransformer/libcider_plan_transformer.a ./presto_cpp/main/lib
3838
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/planTransformer/libvelox_plan_transformer.a ./presto_cpp/main/lib
3939
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider-velox/src/substrait/libvelox_substrait_convertor.a ./presto_cpp/main/lib
40-
cp -a ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/module/libcider.so* ./presto_cpp/main/lib
41-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/processor/libcider_processor.a ./presto_cpp/main/lib
42-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/substrait/libcider_plan_substrait.a ./presto_cpp/main/lib
4340
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/velox/velox/substrait/libvelox_substrait_plan_converter.a ./presto_cpp/main/lib
4441
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/template/libQueryEngine.a ./presto_cpp/main/lib
4542
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/function/libcider_function.so ./presto_cpp/main/lib
4643
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/nextgen/jitlib/libjitlib.a ./presto_cpp/main/lib
4744
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/nextgen/libnextgen.a ./presto_cpp/main/lib
48-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/parser/libcider_plan_parser.a ./presto_cpp/main/lib
49-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/exec/plan/lookup/libcider_func_lkup.a ./presto_cpp/main/lib
50-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/common/libsubstrait_common.a ./presto_cpp/main/lib
51-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/function/libsubstrait_function.a ./presto_cpp/main/lib
52-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/substrait/type/libsubstrait_type.a ./presto_cpp/main/lib
53-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/thirdparty/SUBSTRAITCPP/src/SUBSTRAITCPP/third_party/yaml-cpp/libyaml-cpp.a ./presto_cpp/main/lib
54-
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/util/libcider_util.a ./presto_cpp/main/lib
5545
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/src/cider/function/libcider_runtime_function.so ./presto_cpp/main/lib
46+
cp ./BDTK/build-${BDTK_BUILD_MODE}/cpp/libcider_static.a ./presto_cpp/main/lib
5647

5748
make -j ${CPU_COUNT:-`nproc`} PRESTO_ENABLE_PARQUET=ON VELOX_ENABLE_HDFS=ON ${PRESTO_CPP_MODE}
5849
rm -rf ./_build/${PRESTO_CPP_MODE}/presto_cpp/function

cpp/CMakeLists.txt

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,10 @@ if(BDTK_ENABLE_CIDER)
120120
endif()
121121

122122
if(CIDER_ENABLE_SUBSTRAIT)
123-
set(substrait_directory ${CMAKE_SOURCE_DIR}/thirdparty/substrait/proto)
124-
include_directories(thirdparty/substrait/proto)
123+
set(SUBSTRAIT_ROOT ${CMAKE_SOURCE_DIR}/thirdparty/substrait/proto)
125124
else()
126-
set(substrait_directory
125+
set(SUBSTRAIT_ROOT
127126
${CMAKE_SOURCE_DIR}/thirdparty/velox/velox/substrait/proto)
128-
include_directories(thirdparty/velox/velox/substrait/proto)
129127
endif()
130128

131129
# TODO: remove after cleanup public API dependency RapidJSON
@@ -135,20 +133,34 @@ if(BDTK_ENABLE_CIDER)
135133
# robin-hood-hashing
136134
include_directories(thirdparty/robin-hood-hashing/src/include)
137135

138-
# substrait-cpp
136+
# substrait
137+
include(substrait)
139138
include(substrait-cpp)
140-
include_directories(${SUBSTRAITCPP_INCLUDE_DIR})
141-
142-
#
143-
# Subdirectories
144-
#
145-
# include_directories(src/cider) include_directories(src/cider/include)
146-
# add_subdirectory(src/cider)
147139

148140
if(CIDER_ENABLE_VELOX)
149141
add_subdirectory(thirdparty/velox)
150142
endif()
151143

144+
include(BuildUtils)
145+
list(APPEND CIDER_DEPENDENCIES_LIBS substrait)
146+
list(APPEND CIDER_DEPENDENCIES_LIBS SubstraitCpp::function SubstraitCpp::type
147+
SubstraitCpp::common)
148+
list(APPEND CIDER_DEPENDENCIES_LIBS yaml-cpp)
149+
list(APPEND CIDER_DEPENDENCIES_LIBS cider_util cider_processor cider_plan
150+
cider_module)
151+
152+
set(BUILD_OUTPUT_ROOT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
153+
icl_car(_FIRST_LIB ${CIDER_DEPENDENCIES_LIBS})
154+
icl_cdr(_OTHER_LIBS ${CIDER_DEPENDENCIES_LIBS})
155+
create_merged_static_lib(
156+
cider_static
157+
NAME
158+
cider_static
159+
ROOT
160+
${_FIRST_LIB}
161+
TO_MERGE
162+
${_OTHER_LIBS})
163+
152164
include_directories(src/cider)
153165
include_directories(src/cider/include)
154166
add_subdirectory(src/cider)

cpp/cmake-modules/BuildUtils.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ function(create_merged_static_lib output_target)
308308
COMMENT "Bundling ${output_lib_path}"
309309
VERBATIM)
310310

311-
message(STATUS "Creating bundled static library target ${output_target} at ${output_lib_path}"
312-
)
311+
message(STATUS "Creating bundled static library target ${output_target} at ${output_lib_path}")
313312

314313
add_library(${output_target} STATIC IMPORTED)
315314
set_target_properties(${output_target} PROPERTIES IMPORTED_LOCATION ${output_lib_path})

0 commit comments

Comments
 (0)