forked from ClickHouse/clickhouse-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (38 loc) · 1.08 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
CMAKE_MINIMUM_REQUIRED (VERSION 3.0.2)
INCLUDE (cmake/cpp17.cmake)
INCLUDE (cmake/subdirs.cmake)
INCLUDE (cmake/openssl.cmake)
OPTION (BUILD_BENCHMARK "Build benchmark" OFF)
OPTION (BUILD_TESTS "Build tests" OFF)
OPTION (WITH_OPENSSL "Use OpenSSL for TLS connections" OFF)
PROJECT (CLICKHOUSE-CLIENT)
USE_CXX17 ()
USE_OPENSSL ()
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE "RelWithDebInfo")
ENDIF ()
IF (UNIX)
IF (NOT APPLE)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
ENDIF ()
SET (CMAKE_EXE_LINKER_FLAGS, "${CMAKE_EXE_LINKER_FLAGS} -lpthread")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
ENDIF ()
INCLUDE_DIRECTORIES (.)
INCLUDE_DIRECTORIES (contrib)
SUBDIRS (
clickhouse
contrib/absl
contrib/cityhash
contrib/lz4
)
IF (BUILD_BENCHMARK)
SUBDIRS (bench)
ENDIF (BUILD_BENCHMARK)
IF (BUILD_TESTS)
SUBDIRS (
contrib/gtest
tests/simple
ut
)
ENDIF (BUILD_TESTS)