-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
64 lines (52 loc) · 1.87 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
cmake_minimum_required(VERSION 3.20)
project(ArrowHouse)
enable_testing()
set(ArrowHouse_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
set(CMAKE_CXX_STANDARD 23)
# gcc -Wno-error=stringop-overflow
set(PEDANTIC "-Werror -Wall -Wextra -Wunreachable-code -Wpointer-arith")
set(IGNORES "-Wno-unused-parameter")
set(MUTED_ERRORS "-Wno-error=redundant-move -Wno-error=deprecated-declarations -Wno-error=array-bounds \
-Wno-error=missing-field-initializers -Wno-error=ignored-attributes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -fno-omit-frame-pointer ${PEDANTIC} ${IGNORES}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fno-omit-frame-pointer ${PEDANTIC} ${MUTED_ERRORS} ${IGNORES}")
find_package(Arrow REQUIRED PATHS ${ArrowHouse_DEPS_PATH})
find_package(GTest)
if (NOT GTest_FOUND)
set(GTEST_INCLUDE_DIRS ${ArrowHouse_SOURCE_DIR}/contrib/googletest/googletest/include)
endif()
include_directories(
${ARROW_INCLUDE_DIR}
${GTEST_INCLUDE_DIRS}
${ArrowHouse_SOURCE_DIR}
${ArrowHouse_SOURCE_DIR}/base
${ArrowHouse_SOURCE_DIR}/contrib/cityhash102/include
)
add_subdirectory(contrib)
add_subdirectory(Common)
add_subdirectory(Columns)
add_subdirectory(DataStreams)
add_subdirectory(Functions)
add_subdirectory(YdbModes)
add_library(
Agg STATIC
AggregateFunctions/IAggregateFunction.cpp
Aggregator.cpp
# used in Common/Allocator
base/common/mremap.cpp
)
add_library(arrowhouse INTERFACE)
target_link_libraries(arrowhouse INTERFACE
Agg YdbModes Columns DataStreams Common
ch_contrib::cityhash
)
target_include_directories(arrowhouse SYSTEM INTERFACE
${ArrowHouse_SOURCE_DIR}
${ArrowHouse_SOURCE_DIR}/base
)
add_executable(ut_aggregator tests/ut_aggregator.cpp)
target_link_libraries(ut_aggregator arrowhouse Arrow::arrow_static ch_contrib::gtest)
add_test(NAME aggregator COMMAND ut_aggregator)