forked from intel/BDTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
99 lines (81 loc) · 3.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (c) 2022 Intel Corporation.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
.PHONY: all clean build debug release \
test-cider test-cider-velox test-debug test-release
BUILD_TYPE := Release
all: release
format-fix:
ci/scripts/check.py format branch --fix
format-check:
clang-format --version
ci/scripts/check.py format branch
header-fix:
ci/scripts/check.py header branch --fix
header-check:
ci/scripts/check.py header branch
lint:
ci/scripts/run_cpplint.py \
--cpplint_binary ci/scripts/cpplint.py \
--exclude_globs ci/scripts/lint_exclusions.txt \
--source_dir ci/scripts/lint_inclusions.txt
clean:
@rm -rf build-*
build-common:
@sed -i "s/COMMAND protoc --proto_path \$${CMAKE_SOURCE_DIR}\/ --cpp_out \$${CMAKE_SOURCE_DIR}/COMMAND protoc --proto_path \$${proto_directory}\/ --cpp_out \$${PROTO_OUTPUT_DIR}/g" ./thirdparty/velox/velox/substrait/CMakeLists.txt
@sed -i "s/set(THRIFT_LIB \$${THRIFT_ROOT}\/lib\/libthrift.a)/set(THRIFT_LIB \/usr\/local\/lib\/libthrift.a)/g" ./thirdparty/velox/third_party/CMakeLists.txt
@sed -i "s/velox\/substrait\/proto\///g" ./thirdparty/velox/velox/substrait/proto/substrait/algebra.proto
@sed -i "s/velox\/substrait\/proto\///g" ./thirdparty/velox/velox/substrait/proto/substrait/function.proto
@sed -i "s/velox\/substrait\/proto\///g" ./thirdparty/velox/velox/substrait/proto/substrait/parameterized_types.proto
@sed -i "s/velox\/substrait\/proto\///g" ./thirdparty/velox/velox/substrait/proto/substrait/plan.proto
@sed -i "s/velox\/substrait\/proto\///g" ./thirdparty/velox/velox/substrait/proto/substrait/type_expressions.proto
@mkdir -p build-${BUILD_TYPE}
@cd build-${BUILD_TYPE} && \
cmake -Wno-dev \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DENABLE_FOLLY=OFF \
-DENABLE_JIT_DEBUG=OFF \
-DENABLE_PERF_JIT_LISTENER=OFF\
-DENABLE_INTEL_JIT_LISTENER=OFF \
-DPREFER_STATIC_LIBS=OFF \
-DVELOX_ENABLE_SUBSTRAIT=ON \
-DVELOX_ENABLE_PARQUET=ON \
$(FORCE_COLOR) \
..
build:
VERBOSE=1 cmake --build build-${BUILD_TYPE} -j $${CPU_COUNT:-`nproc`} || \
cmake --build build-${BUILD_TYPE}
@mkdir -p build-${BUILD_TYPE}/cider-velox/function/ && cp -r build-${BUILD_TYPE}/cider/function/*.bc build-${BUILD_TYPE}/cider-velox/function/
debug:
@$(MAKE) build-common BUILD_TYPE=Debug
@$(MAKE) build BUILD_TYPE=Debug
release:
@$(MAKE) build-common BUILD_TYPE=Release
@$(MAKE) build BUILD_TYPE=Release
test-cider:
@cd build-${BUILD_TYPE}/cider/tests && \
ctest -j $${CPU_COUNT:-`nproc`} -V
test-cider-velox:
@cd build-${BUILD_TYPE}/cider-velox/test && \
ctest -j $${CPU_COUNT:-`nproc`} -V
test-debug:
@$(MAKE) test-cider BUILD_TYPE=Debug
@$(MAKE) test-cider-velox BUILD_TYPE=Debug
test-release:
@$(MAKE) test-cider BUILD_TYPE=Release
@$(MAKE) test-cider-velox BUILD_TYPE=Release