Allow to build without experimental compression libraries and remove from fasttest

This commit is contained in:
Alexey Milovidov 2021-05-24 01:18:12 +03:00
parent 57a3f132d7
commit 8d2fa6cf50
13 changed files with 92 additions and 10 deletions

View File

@ -528,7 +528,9 @@ include (cmake/find/rocksdb.cmake)
include (cmake/find/libpqxx.cmake)
include (cmake/find/nuraft.cmake)
include (cmake/find/yaml-cpp.cmake)
include (cmake/find/lizard.cmake)
include (cmake/find/lzsse.cmake)
include (cmake/find/density.cmake)
if(NOT USE_INTERNAL_PARQUET_LIBRARY)
set (ENABLE_ORC OFF CACHE INTERNAL "")

9
cmake/find/density.cmake Normal file
View File

@ -0,0 +1,9 @@
option(USE_DENSITY "Enable DENSITY experimental compression library" ${ENABLE_LIBRARIES})
if (NOT USE_DENSITY)
return()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/density/README.md")
message (ERROR "submodule contrib/density is missing. to fix try run: \n git submodule update --init --recursive")
endif()

9
cmake/find/lizard.cmake Normal file
View File

@ -0,0 +1,9 @@
option(USE_LIZARD "Enable Lizard experimental compression library" ${ENABLE_LIBRARIES})
if (NOT USE_LIZARD)
return()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/lizard/README.md")
message (ERROR "submodule contrib/lizard is missing. to fix try run: \n git submodule update --init --recursive")
endif()

9
cmake/find/lzsse.cmake Normal file
View File

@ -0,0 +1,9 @@
option(USE_LZSSE "Enable LZSSE experimental compression library" ${ENABLE_LIBRARIES})
if (NOT USE_LZSSE)
return()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/lzsse/README.md")
message (ERROR "submodule contrib/lzsse is missing. to fix try run: \n git submodule update --init --recursive")
endif()

View File

@ -4,6 +4,6 @@ if (NOT USE_YAML_CPP)
return()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/yaml-cpp")
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/yaml-cpp/README.md")
message (ERROR "submodule contrib/yaml-cpp is missing. to fix try run: \n git submodule update --init --recursive")
endif()

View File

@ -58,14 +58,21 @@ if (USE_INTERNAL_XZ_LIBRARY)
add_subdirectory (xz)
endif()
add_subdirectory (lizard-cmake)
add_subdirectory (density-cmake)
add_subdirectory (lzsse-cmake)
if (USE_LIZARD)
add_subdirectory (lizard-cmake)
endif ()
if (USE_DENSITY)
add_subdirectory (density-cmake)
endif ()
if (USE_LZSSE)
add_subdirectory (lzsse-cmake)
endif ()
add_subdirectory (poco-cmake)
add_subdirectory (croaring-cmake)
# TODO: refactor the contrib libraries below this comment.
if (USE_INTERNAL_ZSTD_LIBRARY)

View File

@ -185,9 +185,6 @@ function clone_submodules
contrib/dragonbox
contrib/fast_float
contrib/NuRaft
contrib/lizard
contrib/density
contrib/lzsse
)
git submodule sync

View File

@ -14,6 +14,9 @@
#cmakedefine01 USE_SENTRY
#cmakedefine01 USE_GRPC
#cmakedefine01 USE_STATS
#cmakedefine01 CLICKHOUSE_SPLIT_BINARY
#cmakedefine01 USE_DATASKETCHES
#cmakedefine01 USE_YAML_CPP
#cmakedefine01 USE_LIZARD
#cmakedefine01 USE_DENSITY
#cmakedefine01 USE_LZSSE
#cmakedefine01 CLICKHOUSE_SPLIT_BINARY

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_core.h"
#endif
#if USE_DENSITY
#include <Compression/ICompressionCodec.h>
#include <Compression/CompressionFactory.h>
#include <Compression/CompressionInfo.h>
@ -118,3 +124,5 @@ void registerCodecDensity(CompressionCodecFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_core.h"
#endif
#if USE_LZSSE
#include <Compression/ICompressionCodec.h>
#include <Compression/CompressionFactory.h>
#include <Compression/CompressionInfo.h>
@ -150,3 +156,5 @@ void registerCodecsLZSSE(CompressionCodecFactory & factory)
}
}
#endif

View File

@ -1,3 +1,9 @@
#if !defined(ARCADIA_BUILD)
# include "config_core.h"
#endif
#if USE_LIZARD
#include <Compression/ICompressionCodec.h>
#include <Compression/CompressionFactory.h>
#include <Compression/CompressionInfo.h>
@ -111,3 +117,5 @@ void registerCodecLizard(CompressionCodecFactory & factory)
}
}
#endif

View File

@ -1,3 +1,7 @@
#if !defined(ARCADIA_BUILD)
# include "config_core.h"
#endif
#include <Compression/CompressionFactory.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTIdentifier.h>
@ -345,9 +349,18 @@ void registerCodecT64(CompressionCodecFactory & factory);
void registerCodecDoubleDelta(CompressionCodecFactory & factory);
void registerCodecGorilla(CompressionCodecFactory & factory);
void registerCodecMultiple(CompressionCodecFactory & factory);
#if USE_LIZARD
void registerCodecLizard(CompressionCodecFactory & factory);
#endif
#if USE_DENSITY
void registerCodecDensity(CompressionCodecFactory & factory);
#endif
#if USE_LZSSE
void registerCodecsLZSSE(CompressionCodecFactory & factory);
#endif
CompressionCodecFactory::CompressionCodecFactory()
{
@ -360,9 +373,15 @@ CompressionCodecFactory::CompressionCodecFactory()
registerCodecDoubleDelta(*this);
registerCodecGorilla(*this);
registerCodecMultiple(*this);
#if USE_LIZARD
registerCodecLizard(*this);
#endif
#if USE_DENSITY
registerCodecDensity(*this);
#endif
#if USE_LZSSE
registerCodecsLZSSE(*this);
#endif
default_codec = get("LZ4", {}, {});
}

View File

@ -15,3 +15,6 @@
#cmakedefine01 USE_LIBPQXX
#cmakedefine01 USE_NURAFT
#cmakedefine01 USE_KRB5
#cmakedefine01 USE_LIZARD
#cmakedefine01 USE_DENSITY
#cmakedefine01 USE_LZSSE