Fix build w/o replxx

This commit is contained in:
Azat Khuzhin 2022-01-18 09:51:13 +03:00
parent 66a210410f
commit 3e58094bcb
6 changed files with 16 additions and 14 deletions

View File

@ -1,9 +1,6 @@
option (ENABLE_REPLXX "Enable replxx support" ${ENABLE_LIBRARIES})
if (NOT ENABLE_REPLXX)
add_library(replxx INTERFACE)
target_compile_definitions(replxx INTERFACE USE_REPLXX=0)
message (STATUS "Not using replxx")
return()
endif()
@ -30,6 +27,4 @@ if (COMPILER_CLANG)
target_compile_options(replxx PRIVATE -Wno-documentation)
endif ()
target_compile_definitions(replxx PUBLIC USE_REPLXX=1)
add_library(ch_contrib::replxx ALIAS replxx)

View File

@ -13,15 +13,16 @@
#include <Common/MemoryTracker.h>
#include <base/LineReader.h>
#include <base/scope_guard_safe.h>
#include "Common/Exception.h"
#include "Common/getNumberOfPhysicalCPUCores.h"
#include "Common/tests/gtest_global_context.h"
#include "Common/typeid_cast.h"
#include "Columns/ColumnString.h"
#include "Columns/ColumnsNumber.h"
#include "Core/Block.h"
#include "Core/Protocol.h"
#include "Formats/FormatFactory.h"
#include <Common/Exception.h>
#include <Common/getNumberOfPhysicalCPUCores.h>
#include <Common/tests/gtest_global_context.h>
#include <Common/typeid_cast.h>
#include <Common/config.h>
#include <Columns/ColumnString.h>
#include <Columns/ColumnsNumber.h>
#include <Core/Block.h>
#include <Core/Protocol.h>
#include <Formats/FormatFactory.h>
#include <Common/config_version.h>
#include <Common/UTF8Helpers.h>

View File

@ -1,6 +1,7 @@
#pragma once
#include <Core/Types.h>
#include <Common/config.h>
#if USE_REPLXX
# include <base/ReplxxLineReader.h>

View File

@ -19,3 +19,4 @@
#cmakedefine01 USE_SNAPPY
#cmakedefine01 USE_HIVE
#cmakedefine01 USE_ODBC
#cmakedefine01 USE_REPLXX

View File

@ -17,3 +17,4 @@
#cmakedefine01 USE_KRB5
#cmakedefine01 USE_FILELOG
#cmakedefine01 USE_ODBC
#cmakedefine01 USE_REPLXX

View File

@ -88,3 +88,6 @@ endif()
if (TARGET ch_contrib::unixodbc)
set(USE_ODBC 1)
endif()
if (TARGET ch_contrib::replxx)
set(USE_REPLXX 1)
endif()