-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
73 lines (57 loc) · 2.11 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8.12)
project(duckdb_substrait)
set(CMAKE_CXX_STANDARD 17)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_compile_options(
-Wall
-Werror
-pedantic
-fsanitize=address
-fno-sanitize=vptr
-fno-sanitize=undefined
-fno-sanitize-recover=all)
endif()
set(BUILD_SHELL
OFF
CACHE BOOL "Build the DuckDB Shell and SQLite API Wrappers")
set(BUILD_TPCH_EXTENSION
ON
CACHE BOOL "Build the TPC-H extension.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-sanitize=vptr")
include_directories(src/include)
include_directories(duckdb/extension/tpch/include)
include_directories(duckdb/test/include)
add_subdirectory(duckdb)
add_library(duckdb_substrait src/duckdb_to_substrait.cpp
src/substrait_to_duckdb.cpp)
target_link_libraries(duckdb_substrait duckdb)
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(substrait/gen/proto/cpp)
set(SUBSTRAIT_PATH substrait/gen/proto/cpp/substrait)
set(SUBSTRAIT_SOURCES
${SUBSTRAIT_PATH}/capabilities.pb.cc
${SUBSTRAIT_PATH}/expression.pb.cc
${SUBSTRAIT_PATH}/function.pb.cc
${SUBSTRAIT_PATH}/parameterized_types.pb.cc
${SUBSTRAIT_PATH}/plan.pb.cc
${SUBSTRAIT_PATH}/relations.pb.cc
${SUBSTRAIT_PATH}/type.pb.cc
${SUBSTRAIT_PATH}/type_expressions.pb.cc
${SUBSTRAIT_PATH}/extensions/extensions.pb.cc)
set(SUBSTRAIT_HEADERS
${SUBSTRAIT_PATH}/capabilities.pb.h
${SUBSTRAIT_PATH}/expression.pb.h
${SUBSTRAIT_PATH}/function.pb.h
${SUBSTRAIT_PATH}/parameterized_types.pb.h
${SUBSTRAIT_PATH}/plan.pb.h
${SUBSTRAIT_PATH}/relations.pb.h
${SUBSTRAIT_PATH}/type.pb.h
${SUBSTRAIT_PATH}/type_expressions.pb.h
${SUBSTRAIT_PATH}/extensions/extensions.pb.h)
add_library(substrait STATIC ${SUBSTRAIT_SOURCES} ${SUBSTRAIT_HEADERS})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/substrait/proto/substrait)
target_link_libraries(duckdb_substrait substrait)
target_link_libraries(duckdb_substrait test_helpers)
target_link_libraries(duckdb_substrait ${Protobuf_LIBRARIES})
add_subdirectory("tests")