Fix w/o ODBC build

This commit is contained in:
Azat Khuzhin 2022-01-18 09:49:10 +03:00
parent e05a75f850
commit e0e81b340d
14 changed files with 18 additions and 5 deletions

View File

@ -9,6 +9,7 @@
#include <Common/StringUtils/StringUtils.h>
#include <Common/SensitiveDataMasker.h>
#include <Common/config.h>
#include <base/errnoToString.h>
#include <IO/ReadHelpers.h>
#include <Formats/registerFormats.h>

View File

@ -4,7 +4,7 @@ endif ()
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/nanodbc")
if (NOT TARGET unixodbc)
if (NOT TARGET ch_contrib::unixodbc)
message(FATAL_ERROR "Configuration error: unixodbc is not a target")
endif()
@ -14,6 +14,6 @@ set (SRCS
add_library(nanodbc ${SRCS})
target_link_libraries (nanodbc PUBLIC unixodbc)
target_link_libraries (nanodbc PUBLIC ch_contrib::unixodbc)
target_include_directories (nanodbc SYSTEM PUBLIC "${LIBRARY_DIR}/")
add_library(ch_contrib::nanodbc ALIAS nanodbc)

View File

@ -303,6 +303,5 @@ target_compile_options (unixodbc
-Wno-reserved-id-macro
-O2
)
target_compile_definitions (unixodbc INTERFACE USE_ODBC=1)
add_library (ch_contrib::unixodbc ALIAS unixodbc)

View File

@ -1,11 +1,12 @@
#pragma once
#include <Common/config.h>
#if USE_ODBC
#include <Interpreters/Context_fwd.h>
#include <Interpreters/Context.h>
#include <Server/HTTP/HTTPRequestHandler.h>
#include <Common/config.h>
#include <Poco/Logger.h>

View File

@ -1,6 +1,7 @@
#include "HandlerFactory.h"
#include "PingHandler.h"
#include "ColumnInfoHandler.h"
#include <Common/config.h>
#include <Poco/URI.h>
#include <Poco/Net/HTTPServerRequest.h>
#include <base/logger_useful.h>

View File

@ -2,7 +2,7 @@
#include <Interpreters/Context.h>
#include <Server/HTTP/HTTPRequestHandler.h>
#include <Common/config.h>
#include <Poco/Logger.h>
#if USE_ODBC

View File

@ -19,6 +19,7 @@
#include <Processors/Formats/IInputFormat.h>
#include <base/logger_useful.h>
#include <Server/HTTP/HTMLForm.h>
#include <Common/config.h>
#include <mutex>
#include <memory>

View File

@ -2,6 +2,7 @@
#include <Interpreters/Context.h>
#include <Server/HTTP/HTTPRequestHandler.h>
#include <Common/config.h>
#include <Poco/Logger.h>
#if USE_ODBC

View File

@ -1,5 +1,7 @@
#pragma once
#include <Common/config.h>
#if USE_ODBC
#include <Interpreters/Context.h>

View File

@ -18,3 +18,4 @@
#cmakedefine01 USE_BZIP2
#cmakedefine01 USE_SNAPPY
#cmakedefine01 USE_HIVE
#cmakedefine01 USE_ODBC

View File

@ -16,3 +16,4 @@
#cmakedefine01 USE_NLP
#cmakedefine01 USE_KRB5
#cmakedefine01 USE_FILELOG
#cmakedefine01 USE_ODBC

View File

@ -18,6 +18,7 @@
#include <Common/escapeForFileName.h>
#include <QueryPipeline/QueryPipeline.h>
#include <Processors/Formats/IInputFormat.h>
#include <Common/config.h>
namespace DB

View File

@ -42,6 +42,7 @@ const char * auto_config_build[]
"USE_SSL", "@USE_SSL@",
"USE_HYPERSCAN", "@ENABLE_HYPERSCAN@",
"USE_SIMDJSON", "@USE_SIMDJSON@",
"USE_ODBC", "@USE_ODBC@",
"USE_GRPC", "@USE_GRPC@",
"USE_LDAP", "@USE_LDAP@",
"TZDATA_VERSION", "@TZDATA_VERSION@",

View File

@ -85,3 +85,6 @@ endif()
if (TARGET ch_contrib::llvm)
set(USE_EMBEDDED_COMPILER 1)
endif()
if (TARGET ch_contrib::unixodbc)
set(USE_ODBC 1)
endif()