Better cmake and less libraries

This commit is contained in:
alesapin 2020-07-10 22:08:18 +03:00
parent df176c633e
commit a9824fd650
10 changed files with 52 additions and 4 deletions

View File

@ -1,3 +1,7 @@
option (ENABLE_GTEST_LIBRARY "Enable gtest library" ${ENABLE_LIBRARIES})
if (ENABLE_GTEST_LIBRARY)
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
@ -28,4 +32,6 @@ if((GTEST_INCLUDE_DIRS AND GTEST_BOTH_LIBRARIES) OR GTEST_SRC_DIR)
set(USE_GTEST 1)
endif()
endif()
message (STATUS "Using gtest=${USE_GTEST}: ${GTEST_INCLUDE_DIRS} : ${GTEST_BOTH_LIBRARIES} : ${GTEST_SRC_DIR}")

View File

@ -1,3 +1,7 @@
option(ENABLE_GSASL_LIBRARY "Enable gsasl library" ${ENABLE_LIBRARIES})
if (ENABLE_GSASL_LIBRARY)
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ${NOT_UNBUNDLED})
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
@ -24,4 +28,6 @@ if(LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
set (USE_LIBGSASL 1)
endif()
endif()
message (STATUS "Using libgsasl=${USE_LIBGSASL}: ${LIBGSASL_INCLUDE_DIR} : ${LIBGSASL_LIBRARY}")

View File

@ -1,3 +1,7 @@
option (ENABLE_MSGPACK "Enable msgpack library" ${ENABLE_LIBRARIES})
if (ENABLE_MSGPACK)
option (USE_INTERNAL_MSGPACK_LIBRARY "Set to FALSE to use system msgpack library instead of bundled" ${NOT_UNBUNDLED})
if (USE_INTERNAL_MSGPACK_LIBRARY)
@ -14,4 +18,10 @@ else()
find_path(MSGPACK_INCLUDE_DIR NAMES msgpack.hpp PATHS ${MSGPACK_INCLUDE_PATHS})
endif()
message(STATUS "Using msgpack: ${MSGPACK_INCLUDE_DIR}")
if (MSG_PACK_INCLUDE_DIR)
set(USE_MSGPACK 1)
endif()
endif()
message(STATUS "Using msgpack=${USE_MSGPACK}: ${MSGPACK_INCLUDE_DIR}")

View File

@ -27,7 +27,7 @@ fi
git submodule update --init --recursive | ts '%Y-%m-%d %H:%M:%S' | tee /test_output/submodule_log.txt
export CMAKE_LIBS_CONFIG="-DENABLE_RDKAFKA=0 -DENABLE_S3=0 -DUSE_SENTRY=0 -DENABLE_AMQPCPP=0 -DENABLE_HDFS=0 -DENABLE_MYSQL=0 -DENABLE_GRPC=0 -DENABLE_CURL=0 -DENABLE_JEMALLOC=0 -DENABLE_CAPNP=0 -DENABLE_RDKAFKA=0 -DENABLE_UNWIND=0 -DENABLE_ICU=0 -DENABLE_POCO_MONGODB=0 -DENABLE_POCO_REDIS=0 -DENABLE_POCO_NETSSL=0 -DENABLE_ODBC=0 -DENABLE_MYSQL=0 -DENABLE_SSL=0 -DENABLE_POCO_NETSSL=0 -DENABLE_CASSANDRA=0 -DENABLE_PARQUET=0 -DENABLE_AVRO=0 -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_PROTOBUF=0 -DENABLE_H3=0 -DENABLE_TESTS=0 -DENABLE_UTILS=0 -DENABLE_ODBC=0 -DUSE_INTERNAL_LIBGSASL_LIBRARY=0 -DENABLE_THINLTO=0 -DUSE_INTERNAL_MSGPACK_LIBRARY=0 -DENABLE_LDAP=0 -DUSE_SNAPPY=0 -DUSE_INTERNAL_GTEST_LIBRARY=0"
export CMAKE_LIBS_CONFIG="-DENABLE_RDKAFKA=0 -DENABLE_S3=0 -DUSE_SENTRY=0 -DENABLE_AMQPCPP=0 -DENABLE_HDFS=0 -DENABLE_MYSQL=0 -DENABLE_GRPC=0 -DENABLE_CURL=0 -DENABLE_JEMALLOC=0 -DENABLE_CAPNP=0 -DENABLE_RDKAFKA=0 -DENABLE_ICU=0 -DENABLE_POCO_NETSSL=0 -DENABLE_ODBC=0 -DENABLE_MYSQL=0 -DENABLE_SSL=0 -DENABLE_POCO_NETSSL=0 -DENABLE_CASSANDRA=0 -DENABLE_PARQUET=0 -DENABLE_AVRO=0 -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_PROTOBUF=0 -DENABLE_H3=0 -DENABLE_TESTS=0 -DENABLE_UTILS=0 -DENABLE_ODBC=0 -DENABLE_GSASL_LIBRARY=0 -DENABLE_THINLTO=0 -DENABLE_MSGPACK=0 -DENABLE_LDAP=0 -DUSE_SNAPPY=0"
export CCACHE_DIR=/ccache
export CCACHE_BASEDIR=/ClickHouse

View File

@ -370,7 +370,7 @@ endif()
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${DOUBLE_CONVERSION_INCLUDE_DIR})
if (USE_INTERNAL_MSGPACK_LIBRARY)
if (USE_MSGPACK)
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${MSGPACK_INCLUDE_DIR})
endif()

View File

@ -9,3 +9,5 @@
#cmakedefine01 USE_ORC
#cmakedefine01 USE_ARROW
#cmakedefine01 USE_PROTOBUF
#cmakedefine01 USE_MSGPACK

View File

@ -1,5 +1,8 @@
#include <cstdlib>
#include <Processors/Formats/Impl/MsgPackRowInputFormat.h>
#if USE_MSGPACK
#include <cstdlib>
#include <Common/assert_cast.h>
#include <IO/ReadHelpers.h>
@ -209,3 +212,5 @@ void registerInputFormatProcessorMsgPack(FormatFactory & factory)
}
}
#endif

View File

@ -1,5 +1,10 @@
#pragma once
#include "config_formats.h"
#include "config_core.h"
#if USE_MSGPACK
#include <Processors/Formats/IRowInputFormat.h>
#include <Formats/FormatFactory.h>
#include <IO/PeekableReadBuffer.h>
@ -63,3 +68,5 @@ private:
};
}
#endif

View File

@ -1,4 +1,7 @@
#include <Processors/Formats/Impl/MsgPackRowOutputFormat.h>
#if USE_MSGPACK
#include <Formats/FormatFactory.h>
#include <Common/assert_cast.h>
@ -157,3 +160,5 @@ void registerOutputFormatProcessorMsgPack(FormatFactory & factory)
}
}
#endif

View File

@ -1,5 +1,10 @@
#pragma once
#include "config_formats.h"
#include "config_core.h"
#if USE_MSGPACK
#include <Core/Block.h>
#include <IO/WriteBuffer.h>
#include <Processors/Formats/IRowOutputFormat.h>
@ -26,3 +31,5 @@ private:
};
}
#endif