mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
0d942a69c5
Cap'n Proto is a binary message format. Like Protocol Buffers and Thrift (but unlike JSON or MessagePack), Cap'n Proto messages are strongly-typed and not self-describing. Due to this, it requires a schema setting to specify schema file and the root object. The schema is parsed on runtime and cached for each SQL statement.
23 lines
784 B
CMake
23 lines
784 B
CMake
option (ENABLE_CAPNP "Enable Cap'n Proto" ON)
|
|
|
|
if (ENABLE_CAPNP)
|
|
set (CAPNP_PATHS "/usr/local/opt/capnp/lib")
|
|
set (CAPNP_INCLUDE_PATHS "/usr/local/opt/capnp/include")
|
|
find_library (CAPNP capnp PATHS ${CAPNP_PATHS})
|
|
find_library (CAPNPC capnpc PATHS ${CAPNP_PATHS})
|
|
find_library (KJ kj PATHS ${CAPNP_PATHS})
|
|
set (CAPNP_LIBS ${CAPNP} ${CAPNPC} ${KJ})
|
|
|
|
find_path (CAPNP_INCLUDE_DIR NAMES capnp/schema-parser.h PATHS ${CAPNP_INCLUDE_PATHS})
|
|
if (CAPNP_INCLUDE_DIR AND CAPNP_LIBS)
|
|
include_directories (${CAPNP_INCLUDE_DIR})
|
|
set(USE_CAPNP 1)
|
|
endif ()
|
|
endif ()
|
|
|
|
if (USE_CAPNP)
|
|
message (STATUS "Using capnp=${USE_CAPNP}: ${CAPNP_INCLUDE_DIR} : ${CAPNP_LIBS}")
|
|
else ()
|
|
message (STATUS "Build without capnp (support for Cap'n Proto format will be disabled)")
|
|
endif ()
|