mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
option(ENABLE_NANODBC "Enalbe nanodbc" ${ENABLE_LIBRARIES})
|
|
|
|
if (NOT ENABLE_NANODBC)
|
|
set (USE_ODBC 0)
|
|
return()
|
|
endif()
|
|
|
|
if (NOT ENABLE_ODBC)
|
|
set (USE_NANODBC 0)
|
|
message (STATUS "Using nanodbc=${USE_NANODBC}")
|
|
return()
|
|
endif()
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/CMakeLists.txt")
|
|
message (WARNING "submodule contrib/nanodbc is missing. to fix try run: \n git submodule update --init --recursive")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal nanodbc library")
|
|
set (USE_NANODBC 0)
|
|
return()
|
|
endif()
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/unixodbc/include")
|
|
message (ERROR "submodule contrib/unixodbc is missing. to fix try run: \n git submodule update --init --recursive")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal unixodbc needed for nanodbc")
|
|
set (USE_NANODBC 0)
|
|
return()
|
|
endif()
|
|
|
|
set (USE_NANODBC 1)
|
|
|
|
set (NANODBC_LIBRARY nanodbc)
|
|
|
|
set (NANODBC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/nanodbce")
|
|
|
|
message (STATUS "Using nanodbc=${USE_NANODBC}: ${NANODBC_INCLUDE_DIR} : ${NANODBC_LIBRARY}")
|
|
message (STATUS "Using unixodbc")
|