This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
523 lines (458 loc) · 17.8 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
cmake_minimum_required(VERSION 3.16.3)
set(HDK_VERSION_MAJOR "0")
set(HDK_VERSION_MINOR "9")
set(HDK_VERSION_PATCH "0")
set(HDK_VERSION_EXTRA "dev")
set(HDK_VERSION_RAW_NUMERIC "${HDK_VERSION_MAJOR}.${HDK_VERSION_MINOR}.${HDK_VERSION_PATCH}")
set(HDK_VERSION_RAW "${HDK_VERSION_MAJOR}.${HDK_VERSION_MINOR}.${HDK_VERSION_PATCH}${HDK_VERSION_EXTRA}")
project(
HeterogeneousDataKernels
VERSION ${HDK_VERSION_RAW_NUMERIC}
LANGUAGES C CXX
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Force -O0 optimization level for debug builds.
if (WIN32)
# Export all symbols from DLLs by default. It is necessary because there are too many of them
# to mark explicitly.
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
# 0x0600 means Windows Vista (anything after XP). This setting is needed because without it
# boost defines different API levels for different parts of the library and functions appear in
# different namespaces.
add_definitions("-DBOOST_USE_WINAPI_VERSION=0x0600")
# On windows TBB adds tbb12_debug.lib unless the following define is set. This tbb12_debug.lib
# is not present in conda-forge tbb build.
add_definitions("-D__TBB_NO_IMPLICIT_LINKAGE")
# Always use multithreaded DLL runtime (not debug) because using debug requires other dependencies
# to be built with debug runtime which we don't have.
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od")
# Add a special option to require MSVC to define __cplusplus macro to a proper value
# corresponding to the real C++ language standard version. Without this option Microsoft compiler
# always defines __cplusplus to 199711L. A valid number is needed in llvm headers.
add_compile_options(/Zc:__cplusplus)
# MSVC warnings management
# TODO: Instead of supressing these warnings they should be addressed.
option(ENABLE_NO_WINWARNINGS "disable most windows warnings" ON)
add_compile_definitions("NOMINMAX")
if(ENABLE_NO_WINWARNINGS)
add_compile_options(/W0 /wd5045)
else()
add_compile_options(/W4 /permisive-)
endif()
else()
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
# Do not allow undefined symbols when linking shared libraries because such symbols break
# Windows build.
add_link_options("LINKER:-z,defs")
endif()
# set default build type to "Release w/ Debug Info"
set(default_build_type "RelWithDebInfo")
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif ()
# External Dependencies
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/omniscidb/cmake/Modules")
set(ENABLE_CONDA OFF)
if(DEFINED ENV{CONDA_PREFIX})
set(ENABLE_CONDA ON)
set(CMAKE_SYSROOT "$ENV{CONDA_BUILD_SYSROOT}")
list(APPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# When conda build is running CONDA_PREFIX points to build env
# while install should happen to host env to detect new files. If
# CMAKE_INSTALL_PREFIX is already defined to point to host env we
# should not override it here but we override the default value
# /usr/local (C:\Program Files) to conda environment location to
# execute in CI.
file(TO_CMAKE_PATH "$ENV{CONDA_PREFIX}" CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "..." FORCE)
endif()
endif()
string(TIMESTAMP HDK_BUILD_DATE "%Y%m%d")
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
find_package(Git)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short=10 HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE HDK_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
set(HDK_GIT_HASH "source-release")
endif()
file(WRITE ${CMAKE_BINARY_DIR}/HDK_GIT_HASH.txt "${HDK_GIT_HASH}\n")
file(STRINGS ${CMAKE_BINARY_DIR}/HDK_GIT_HASH.txt HDK_GIT_HASH)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/src/release.h"
"${CMAKE_BINARY_DIR}/MapDRelease.h"
@ONLY
)
list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/HDK_GIT_HASH.txt)
list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/MapDRelease.h)
# required to force regen of HDK_GIT_HASH.txt, MapDRelease.h
add_custom_target(rerun_cmake ALL
COMMAND cmake .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
include_directories(${CMAKE_BINARY_DIR})
# Folly
option(ENABLE_FOLLY "Use Folly" ON)
if(ENABLE_FOLLY)
find_package(Folly)
if(NOT Folly_FOUND)
set(ENABLE_FOLLY OFF CACHE BOOL "Use Folly" FORCE)
else()
set(FOLLY_LIBRARIES "")
add_definitions("-DHAVE_FOLLY")
find_package(gflags CONFIG REQUIRED)
set_target_properties(gflags_shared PROPERTIES
MAP_IMPORTED_CONFIG_DEBUG Release
)
list(APPEND Folly_LIBRARIES Folly::folly)
# TODO: use Folly::folly_deps?
if(MSVC)
find_package(Libevent COMPONENTS core REQUIRED)
list(APPEND Folly_LIBRARIES libevent::core)
endif()
endif()
endif()
# SQLite
find_package(SQLite3 REQUIRED)
include_directories(${SQLite3_INCLUDE_DIRS})
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(ENABLE_PYTHON "Build Python libraries" ON)
option(ENABLE_SQL "Enable SQL support" ON)
if(BUILD_SHARED_LIBS)
add_definitions("-DENABLE_SHARED_LIBS")
# With no this option all installed shared objects would get an empty
# rpath that would break a link with libjvm.so.
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
endif()
option(ENABLE_JIT_DEBUG "Enable debugging symbols for the JIT" OFF)
if (ENABLE_JIT_DEBUG)
add_definitions("-DWITH_JIT_DEBUG")
endif()
# Arrow
find_package(Arrow REQUIRED)
add_definitions("-DARROW_NO_DEPRECATED_API")
include_directories(${Arrow_INCLUDE_DIRS})
# Parquet
find_package(Parquet REQUIRED)
# Boost, required for OmniSciDB
add_definitions("-DBOOST_LOG_DYN_LINK") # dyn linking only
find_package(Boost COMPONENTS log log_setup filesystem program_options regex system thread timer locale iostreams REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
# TBB
find_package(TBB REQUIRED)
add_definitions("-DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1")
# Profiler
set(PROFILER_LIBS "")
# Cost Model
option(ENABLE_DWARF_BENCH "Enable Dwarf Bench" OFF)
if(ENABLE_DWARF_BENCH)
message(STATUS "Dwarf Bench enabled")
add_definitions("-DHAVE_DWARF_BENCH")
endif()
option(ENABLE_ARMADILLO "Enable Armadillo for Dwarf Bench" OFF)
if(ENABLE_ARMADILLO)
message(STATUS "Armadillo enabled")
add_definitions("-DHAVE_ARMADILLO")
endif()
option(ENABLE_L0 "Enable level zero support" OFF)
if(ENABLE_L0)
find_package(LevelZero REQUIRED COMPONENTS ${LevelZero_COMPONENTS})
include_directories(${LevelZero_INCLUDE_DIRS})
add_definitions("-DHAVE_L0")
endif()
set(CUDA_USE_STATIC_CUDA_RUNTIME ON CACHE STRING "Use static CUDA runtime")
option(ENABLE_CUDA "Enable CUDA support" OFF)
if(ENABLE_CUDA)
enable_language(CUDA)
find_package(CUDAToolkit REQUIRED)
# A temporary workaround for non-conda envs
include_directories(${CUDAToolkit_INCLUDE_DIRS})
list(APPEND CUDA_LIBRARIES CUDA::cudart CUDA::cuda_driver)
add_definitions("-DHAVE_CUDA")
else()
set(CUDA_LIBRARIES "")
set(MAPD_PACKAGE_FLAGS "${MAPD_PACKAGE_FLAGS}-cpu")
endif()
# CUDA architecture flags
if("${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "debug")
option(ENABLE_ONLY_ONE_ARCH "Enable quicker building for only one GPU arch" ON)
else()
option(ENABLE_ONLY_ONE_ARCH "Enable quicker building for only one GPU arch" OFF)
endif()
if(ENABLE_CUDA)
set(MAPD_CUDA_OPTIONS)
# Set Thrust debug mode for CUDA compilation project-wide
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPERCASE)
if(CMAKE_BUILD_TYPE_UPPERCASE MATCHES DEBUG)
list(APPEND MAPD_CUDA_OPTIONS -DTHRUST_DEBUG --debug)
else()
list(APPEND MAPD_CUDA_OPTIONS -O3)
endif()
list(APPEND MAPD_CUDA_OPTIONS -Xcompiler -fPIC -D_FORCE_INLINES -std=c++17)
if(ENABLE_ONLY_ONE_ARCH)
execute_process(
COMMAND cmake -S ${CMAKE_SOURCE_DIR}/NvidiaComputeCapability -B NvidiaComputeCapability
OUTPUT_QUIET
ERROR_QUIET
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
execute_process(
COMMAND cmake --build NvidiaComputeCapability
OUTPUT_FILE ${CMAKE_BINARY_DIR}/NvidiaComputeCapability/build.out.txt
ERROR_FILE ${CMAKE_BINARY_DIR}/NvidiaComputeCapability/build.err.txt
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
set(NVIDIA_COMPUTE_CAPABILITY "")
if (EXISTS ${CMAKE_BINARY_DIR}/NvidiaComputeCapability.txt)
file(STRINGS ${CMAKE_BINARY_DIR}/NvidiaComputeCapability.txt NVIDIA_COMPUTE_CAPABILITY)
endif()
endif()
if (ENABLE_ONLY_ONE_ARCH AND NOT "${NVIDIA_COMPUTE_CAPABILITY}" STREQUAL "")
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0")
set(CMAKE_CUDA_ARCHITECTURES ${NVIDIA_COMPUTE_CAPABILITY}-virtual)
list(APPEND MAPD_CUDA_OPTIONS -Wno-deprecated-gpu-targets)
message(STATUS "CUDA_ARCHITECTURES: ${CMAKE_CUDA_ARCHITECTURES}")
else()
set (CUDA_COMPILATION_ARCH
-gencode=arch=compute_${NVIDIA_COMPUTE_CAPABILITY},code=compute_${NVIDIA_COMPUTE_CAPABILITY}
-Wno-deprecated-gpu-targets
)
message(STATUS "CUDA_COMPILATION_ARCH: ${CUDA_COMPILATION_ARCH}")
add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:${CUDA_COMPILATION_ARCH}>")
endif()
add_custom_target(clean_nvidia_compute_capability
COMMAND ${CMAKE_BUILD_TOOL} clean
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/NvidiaComputeCapability
)
add_dependencies(clean-all clean_nvidia_compute_capability)
else()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0")
message(STATUS "CMake 3.18+, Setting CUDA_ARCHITECTURES.")
set(CMAKE_CUDA_ARCHITECTURES
50-virtual
60-virtual
70-virtual
75-virtual
80-virtual)
list(APPEND MAPD_CUDA_OPTIONS -Wno-deprecated-gpu-targets)
message(STATUS "CUDA_ARCHITECTURES: ${CMAKE_CUDA_ARCHITECTURES}")
else()
message(STATUS "CMake 3.17 or under, setting CUDA architecture flags manually.")
set(CUDA_COMPILATION_ARCH
-gencode=arch=compute_50,code=compute_50;
-gencode=arch=compute_60,code=compute_60;
-gencode=arch=compute_70,code=compute_70;
-gencode=arch=compute_75,code=compute_75;
-gencode=arch=compute_80,code=compute_80;
-Wno-deprecated-gpu-targets)
message(STATUS "CUDA_COMPILATION_ARCH: ${CUDA_COMPILATION_ARCH}")
list(APPEND MAPD_CUDA_OPTIONS ${CUDA_COMPILATION_ARCH})
endif()
if(ENABLE_ONLY_ONE_ARCH)
message(STATUS "ENABLE_ONLY_ONE_ARCH ignored because NvidiaComputeCapability.txt not found or not readable")
endif()
endif()
if("${CMAKE_CUDA_COMPILER_ID}" STREQUAL "NVIDIA")
include(ProcessorCount)
ProcessorCount(N)
if(CMAKE_CUDA_COMPILER_VERSION GREATER_EQUAL 11.3 AND NOT N EQUAL 0)
message(STATUS "Enabling NVCC multi-threaded compilation with ${N} threads.")
list(APPEND MAPD_CUDA_OPTIONS --threads ${N})
set(NVCC_THREADS --threads ${N})
endif()
endif()
add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:${MAPD_CUDA_OPTIONS}>")
endif()
if (ENABLE_CUDA)
list(INSERT Arrow_LIBRARIES 0 ${Arrow_GPU_CUDA_LIBRARIES})
endif()
# LLVM
if (WIN32)
find_package(zstd REQUIRED)
endif()
find_package(LLVM CONFIG REQUIRED)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
find_library(CLANG_LIB clang-cpp)
find_library(LLVM_LIB LLVM)
# Deps builds use separate libs for each clang component, while some distros now bundle into a single lib
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR NOT LLVM_LIB)
set(LLVM_COMPONENTS support orcjit core irreader option linker)
if(ENABLE_INTEL_JIT_LISTENER)
list(APPEND LLVM_COMPONENTS inteljitevents)
endif()
llvm_map_components_to_libnames(llvm_libs ${LLVM_TARGETS_TO_BUILD} ${LLVM_COMPONENTS})
set(clang_libs
clangFrontend
clangSerialization
clangDriver
clangTooling
clangParse
clangSema
clangAnalysis
clangEdit
clangAST
clangLex
clangBasic
clangRewrite
clangRewriteFrontend)
# LLVMSupport explicitly lists tinfo in its INTERFACE_LINK_LIBRARIES, even
# though we provide it in our build of ncurses. Since LLVMSupport is listed
# as a requirement for other llvm libs, we need to walk through the entire
# list in order to remove all instances of tinfo.
foreach(lib ${llvm_libs})
get_target_property(interface_libs ${lib} INTERFACE_LINK_LIBRARIES)
list(REMOVE_ITEM interface_libs tinfo z rt pthread -lpthread m dl)
set_target_properties(${lib} PROPERTIES INTERFACE_LINK_LIBRARIES "${interface_libs}")
endforeach()
list(APPEND llvm_libs ${CURSES_NCURSES_LIBRARY})
else()
if(NOT CLANG_LIB)
message(FATAL_ERROR "Could not find CLANG library.")
endif()
set(clang_libs ${CLANG_LIB})
set(llvm_libs ${LLVM_LIB})
endif()
# SPIRV-Translator
if(ENABLE_L0)
find_package(PkgConfig REQUIRED)
pkg_search_module(LLVMSPIRVLib REQUIRED IMPORTED_TARGET LLVMSPIRVLib)
message(STATUS "Found LLVMSPIRVLib of version ${LLVMSPIRVLib_VERSION}")
list(PREPEND llvm_libs PkgConfig::LLVMSPIRVLib)
endif()
# address and thread sanitizer
option(ENABLE_STANDALONE_CALCITE "Require standalone Calcite server" OFF)
option(ENABLE_ASAN "Enable address sanitizer" OFF)
option(ENABLE_TSAN "Enable thread sanitizer" OFF)
option(ENABLE_UBSAN "Enable undefined behavior sanitizer" OFF)
if(ENABLE_ASAN)
set(SAN_FLAGS "-fsanitize=address -O1 -fno-omit-frame-pointer")
add_definitions("-DWITH_DECODERS_BOUNDS_CHECKING")
elseif(ENABLE_TSAN)
add_definitions("-DHAVE_TSAN")
# Copy the config directory to the build dir for TSAN suppressions
file(COPY omniscidb/config DESTINATION ${CMAKE_BINARY_DIR})
set(SAN_FLAGS "-fsanitize=thread -fPIC -O1 -fno-omit-frame-pointer")
# required for older GCC, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64354
add_definitions("-D__SANITIZE_THREAD__")
elseif(ENABLE_UBSAN)
set(SAN_FLAGS "-fsanitize=undefined -fPIC -O1 -fno-omit-frame-pointer")
endif()
if(ENABLE_ASAN OR ENABLE_TSAN OR ENABLE_UBSAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS}")
set(ENABLE_STANDALONE_CALCITE ON)
endif()
option(ENABLE_DECODERS_BOUNDS_CHECKING "Enable bounds checking for column decoding" OFF)
if(ENABLE_STANDALONE_CALCITE)
add_definitions("-DSTANDALONE_CALCITE")
endif()
# OmniSciDB submodule
include_directories(${CMAKE_SOURCE_DIR}/omniscidb)
add_subdirectory(omniscidb/Shared)
add_subdirectory(omniscidb/OSDependent)
include_directories(omniscidb/ThirdParty/rapidjson)
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
if(NOT MSVC)
# At the present time the current vcpkg version of rapidjson is 2020-09-14:
# https://github.com/microsoft/vcpkg/blob/master/versions/r-/rapidjson.json
# and the Windows build fails because it does not have this fix:
# https://github.com/Tencent/rapidjson/pull/1568
# Once vcpkg's rapidjson has this fix then let's try not making this exception for MSVC.
# When this changes, remove this exception from all other similar CMakeLists.txt files too.
add_definitions(-DRAPIDJSON_NOMEMBERITERATORCLASS)
endif()
include_directories(omniscidb/ThirdParty/googletest)
add_subdirectory(omniscidb/ThirdParty/googletest)
# TODO: replace with glog
add_subdirectory(omniscidb/Logger)
add_subdirectory(omniscidb/Utils)
add_subdirectory(omniscidb/Calcite)
add_subdirectory(omniscidb/ConfigBuilder)
add_subdirectory(omniscidb/SchemaMgr)
add_subdirectory(omniscidb/StringDictionary)
add_subdirectory(omniscidb/L0Mgr)
add_subdirectory(omniscidb/CudaMgr)
add_subdirectory(omniscidb/DataMgr)
add_subdirectory(omniscidb/ArrowStorage)
add_subdirectory(omniscidb/Analyzer)
add_subdirectory(omniscidb/IR)
add_subdirectory(omniscidb/SqliteConnector)
add_subdirectory(omniscidb/QueryBuilder)
add_subdirectory(omniscidb/QueryEngine)
add_subdirectory(omniscidb/QueryOptimizer)
add_subdirectory(omniscidb/ResultSet)
add_subdirectory(omniscidb/ResultSetRegistry)
# Source
add_subdirectory(src)
if(BUILD_SHARED_LIBS AND ENABLE_PYTHON)
add_subdirectory(python)
endif()
install(TARGETS
OSDependent
Logger
Shared
Utils
Calcite
ArrowStorage
StringDictionary
DataMgr
CudaMgr
SchemaMgr
L0Mgr
QueryBuilder
QueryEngine
QueryOptimizer
Analyzer
IR
ConfigBuilder
SqliteConnector
ResultSet
ResultSetRegistry
RUNTIME)
if(ENABLE_CUDA)
install(FILES ${CMAKE_BINARY_DIR}/omniscidb/QueryEngine/cuda_mapd_rt.fatbin DESTINATION QueryEngine COMPONENT "exe")
endif()
add_executable(TestDriver apps/TestDriver.cpp)
target_link_libraries(TestDriver PRIVATE HDK)
target_link_libraries(TestDriver PRIVATE ${Arrow_LIBRARIES} IR QueryEngine StringDictionary Analyzer Shared OSDependent Logger ${llvm_libs} ${Boost_LIBRARIES})
target_include_directories(TestDriver PRIVATE src/)
add_custom_target(clean-all
COMMAND ${CMAKE_BUILD_TOOL} clean
)
file(GLOB_RECURSE GENERATED_PYTHON_CPP ${CMAKE_SOURCE_DIR}/python/**/*.cpp)
add_custom_target(hdk_python_clean
COMMAND ${CMAKE_COMMAND} -E remove ${GENERATED_PYTHON_CPP}
)
add_dependencies(clean-all hdk_python_clean)
if (ENABLE_SQL)
add_dependencies(clean-all calcite_java_clean)
endif()
option(ENABLE_TESTS "Build unit tests" ON)
if (ENABLE_TESTS)
enable_testing()
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Suppressing benchmark's tests" FORCE)
add_subdirectory(omniscidb/ThirdParty/googlebenchmark)
add_subdirectory(omniscidb/UdfCompiler)
add_subdirectory(omniscidb/Tests/ArrowSQLRunner)
add_subdirectory(omniscidb/Tests)
endif()
option(ENABLE_BENCHMARKS "Build benchmarks" ON)
if (ENABLE_TESTS AND ENABLE_BENCHMARKS)
add_subdirectory(omniscidb/Benchmarks/taxi)
endif()