Skip to content

Commit

Permalink
feat: add cmake build conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmreadelf committed Feb 3, 2024
1 parent 9dd669f commit ee10f22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions chdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BUILD_DIR=${PROJ_DIR}/buildlib

HDFS="-DENABLE_HDFS=1 -DENABLE_GSASL_LIBRARY=1 -DENABLE_KRB5=1"
MYSQL="-DENABLE_MYSQL=1"
MYSQL="-DENABLE_MYSQL=0"
# check current os type
if [ "$(uname)" == "Darwin" ]; then
export CXX=/usr/local/opt/llvm/bin/clang++
Expand Down Expand Up @@ -73,7 +73,7 @@ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_THINLTO=0 -DENABLE_TESTS=0 -DENABLE_CL
-DENABLE_AZURE_BLOB_STORAGE=0 -DENABLE_CLICKHOUSE_COPIER=0 -DENABLE_CLICKHOUSE_DISKS=0 -DENABLE_CLICKHOUSE_FORMAT=0 -DENABLE_CLICKHOUSE_GIT_IMPORT=0 \
-DENABLE_AWS_S3=1 -DENABLE_HIVE=0 -DENABLE_AVRO=1 \
-DENABLE_CLICKHOUSE_OBFUSCATOR=0 -DENABLE_CLICKHOUSE_ODBC_BRIDGE=0 -DENABLE_CLICKHOUSE_STATIC_FILES_DISK_UPLOADER=0 \
-DENABLE_KAFKA=1 -DENABLE_LIBPQXX=1 -DENABLE_NATS=0 -DENABLE_AMQPCPP=0 -DENABLE_NURAFT=0 \
-DENABLE_KAFKA=0 -DENABLE_LIBPQXX=1 -DENABLE_NATS=0 -DENABLE_AMQPCPP=0 -DENABLE_NURAFT=0 \
-DENABLE_CASSANDRA=0 -DENABLE_ODBC=0 -DENABLE_NLP=0 \
-DENABLE_LDAP=0 \
${MYSQL} \
Expand Down
26 changes: 18 additions & 8 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ add_contrib (murmurhash)
add_contrib (replxx-cmake replxx)
add_contrib (unixodbc-cmake unixodbc)
add_contrib (nanodbc-cmake nanodbc)
add_contrib (capnproto-cmake capnproto)
if (ENABLE_CAPNPROTO) # add by chdb
add_contrib (capnproto-cmake capnproto)
endif ()
add_contrib (yaml-cpp-cmake yaml-cpp)
add_contrib (re2-cmake re2)
add_contrib (xz-cmake xz)
Expand All @@ -90,8 +92,12 @@ add_contrib (arrow-cmake arrow) # requires: snappy, thrift, double-conversion
add_contrib (avro-cmake avro) # requires: snappy
add_contrib (google-protobuf-cmake google-protobuf)
add_contrib (openldap-cmake openldap)
add_contrib (grpc-cmake grpc)
add_contrib (msgpack-c-cmake msgpack-c)
if (ENABLE_GRPC) # add by chdb
add_contrib (grpc-cmake grpc)
endif ()
if (ENABLE_MSGPACK)
add_contrib (msgpack-c-cmake msgpack-c)
endif()
add_contrib (libarchive-cmake libarchive)

add_contrib (corrosion-cmake corrosion)
Expand All @@ -105,16 +111,20 @@ add_contrib (cityhash102)
add_contrib (libfarmhash)
add_contrib (icu-cmake icu)
add_contrib (h3-cmake h3)
add_contrib (mariadb-connector-c-cmake mariadb-connector-c)
if (ENABLE_MYSQLLIB) # add by chdb
add_contrib (mariadb-connector-c-cmake mariadb-connector-c)
endif ()
add_contrib (libfiu-cmake libfiu)

if (ENABLE_TESTS)
add_contrib (googletest-cmake googletest)
endif()

add_contrib (llvm-project-cmake llvm-project)
add_contrib (libfuzzer-cmake llvm-project)
add_contrib (gwpasan-cmake llvm-project)
if (ENABLE_LLVM) # add by chdb
add_contrib (llvm-project-cmake llvm-project)
add_contrib (libfuzzer-cmake llvm-project)
add_contrib (gwpasan-cmake llvm-project)
endif ()
add_contrib (libxml2-cmake libxml2)

add_contrib (aws-cmake
Expand Down Expand Up @@ -212,7 +222,7 @@ add_contrib (libbcrypt-cmake libbcrypt)
add_contrib (google-benchmark-cmake google-benchmark)
add_contrib (ulid-c-cmake ulid-c)

add_contrib (libssh-cmake libssh)
add_contrib (libssh-cmake libssh)

# Put all targets defined here and in subdirectories under "contrib/<immediate-subdir>" folders in GUI-based IDEs.
# Some of third-party projects may override CMAKE_FOLDER or FOLDER property of their targets, so they would not appear
Expand Down

0 comments on commit ee10f22

Please sign in to comment.