diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 8fd1a11f558..d0ab426a8dc 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -84,13 +84,13 @@ add_contrib (thrift-cmake thrift) # parquet/arrow/orc add_contrib (arrow-cmake arrow) # requires: snappy, thrift, double-conversion add_contrib (avro-cmake avro) # requires: snappy -add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift/avro/arrow +add_contrib (protobuf-cmake protobuf) +add_contrib (libhdfs3-cmake libhdfs3) # requires: protobuf +add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift/avro/arrow/libhdfs3 add_contrib (librdkafka-cmake librdkafka) add_contrib (cppkafka-cmake cppkafka) add_contrib (openldap-cmake openldap) add_contrib (grpc-cmake grpc) -add_contrib (protobuf-cmake protobuf) -add_contrib (libhdfs3-cmake libhdfs3) # requires: protobuf add_contrib (msgpack-c-cmake msgpack-c) if (ENABLE_FUZZING) diff --git a/contrib/hive-metastore-cmake/CMakeLists.txt b/contrib/hive-metastore-cmake/CMakeLists.txt index 4a1d90b7cef..9069d46cea7 100644 --- a/contrib/hive-metastore-cmake/CMakeLists.txt +++ b/contrib/hive-metastore-cmake/CMakeLists.txt @@ -1,4 +1,8 @@ -option(ENABLE_HIVE "Enable Hive" ${ENABLE_LIBRARIES}) +if (TARGET ch_contrib::hdfs) + option(ENABLE_HIVE "Enable Hive" ${ENABLE_LIBRARIES}) +elseif(ENABLE_HIVE) + message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use Hive without HDFS") +endif() if (NOT ENABLE_HIVE) message("Hive disabled") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4faa8c86141..7b508505ea2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -120,7 +120,7 @@ if (TARGET ch_contrib::hdfs) endif() add_headers_and_sources(dbms Storages/Cache) -if (TARGET ch_contrib::hivemetastore AND TARGET ch_contrib::hdfs) +if (TARGET ch_contrib::hivemetastore) add_headers_and_sources(dbms Storages/Hive) endif()