Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes #1718

Merged
merged 22 commits into from Dec 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/find_zlib.cmake
Expand Up @@ -11,6 +11,10 @@ if (NOT ZLIB_FOUND)
if (CMAKE_SYSTEM MATCHES "FreeBSD" OR ARCH_I386)
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
endif ()
if (ARCH_AARCH64)
set(WITH_NEON 1 CACHE INTERNAL "")
set(WITH_ACLE 1 CACHE INTERNAL "")
endif ()
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/zlib-ng" "${ClickHouse_BINARY_DIR}/contrib/zlib-ng") # generated zconf.h
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
set (ZLIB_FOUND 1) # for poco
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Interpreters/CMakeLists.txt
Expand Up @@ -7,10 +7,10 @@ endif ()

set (INTERNAL_COMPILER_EXECUTABLE "clickhouse-clang" CACHE STRING "")
set (INTERNAL_LINKER_EXECUTABLE "clickhouse-lld" CACHE STRING "")
set (INTERNAL_COMPILER_NO_WARNING OFF CACHE BOOL "")
set (INTERNAL_COMPILER_NO_WARNING OFF CACHE INTERNAL "")
set (INTERNAL_COMPILER_HEADERS "${PATH_SHARE}/clickhouse/headers" CACHE STRING "")
set (INTERNAL_COMPILER_HEADERS_ROOT "${INTERNAL_COMPILER_HEADERS}" CACHE STRING "")
set (INTERNAL_COMPILER_CUSTOM_ROOT ON CACHE BOOL "")
set (INTERNAL_COMPILER_CUSTOM_ROOT ON CACHE INTERNAL "")

set (INTERNAL_COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CXX_FLAGS_INTERNAL_COMPILER} -x c++ -march=native -fPIC -fvisibility=hidden -fno-implement-inlines -nostdinc -nostdinc++ -Wno-unused-command-line-argument -Bprefix=${PATH_SHARE}/clickhouse -isysroot=${INTERNAL_COMPILER_HEADERS_ROOT}" CACHE STRING "")
string(REPLACE "-no-pie" "" INTERNAL_COMPILER_FLAGS ${INTERNAL_COMPILER_FLAGS})
Expand Down
3 changes: 3 additions & 0 deletions dbms/src/Interpreters/config_compile.h.in
@@ -1,6 +1,9 @@
#pragma once

#cmakedefine CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_LIBRARY_ARCHITECTURE@"
#if !defined(CMAKE_LIBRARY_ARCHITECTURE)
#define CMAKE_LIBRARY_ARCHITECTURE ""
#endif
#cmakedefine PATH_SHARE "@PATH_SHARE@"
#cmakedefine INTERNAL_COMPILER_FLAGS "@INTERNAL_COMPILER_FLAGS@"
#cmakedefine INTERNAL_COMPILER_EXECUTABLE "@INTERNAL_COMPILER_EXECUTABLE@"
Expand Down
3 changes: 3 additions & 0 deletions dbms/src/Storages/StorageMySQL.cpp
@@ -1,4 +1,5 @@
#include <Storages/StorageMySQL.h>
#if USE_MYSQL
#include <Storages/transformQueryForExternalDatabase.h>
#include <Dictionaries/MySQLBlockInputStream.h>

Expand Down Expand Up @@ -44,3 +45,5 @@ BlockInputStreams StorageMySQL::read(
}

}

#endif
5 changes: 5 additions & 0 deletions dbms/src/Storages/StorageMySQL.h
@@ -1,5 +1,8 @@
#pragma once

#include <Common/config.h>
#if USE_MYSQL

#include <ext/shared_ptr_helper.h>

#include <Storages/IStorage.h>
Expand Down Expand Up @@ -46,3 +49,5 @@ class StorageMySQL : public ext::shared_ptr_helper<StorageMySQL>, public IStorag
};

}

#endif
4 changes: 4 additions & 0 deletions dbms/src/TableFunctions/CMakeLists.txt
Expand Up @@ -6,5 +6,9 @@ list(REMOVE_ITEM clickhouse_table_functions_headers ITableFunction.h TableFuncti

add_library(clickhouse_table_functions ${clickhouse_table_functions_sources})
target_link_libraries(clickhouse_table_functions dbms clickhouse_storages_system ${Poco_Foundation_LIBRARY})
if (Poco_DataODBC_FOUND)
target_link_libraries (clickhouse_table_functions ${Poco_DataODBC_LIBRARY})
endif ()


target_include_directories (clickhouse_table_functions BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})
6 changes: 5 additions & 1 deletion dbms/src/TableFunctions/TableFunctionODBC.cpp
@@ -1,3 +1,6 @@
#include <TableFunctions/TableFunctionODBC.h>

#if Poco_DataODBC_FOUND
#include <type_traits>
#include <ext/scope_guard.h>

Expand All @@ -8,7 +11,6 @@
#include <Storages/StorageODBC.h>
#include <TableFunctions/ITableFunction.h>
#include <TableFunctions/TableFunctionFactory.h>
#include <TableFunctions/TableFunctionODBC.h>
#include <Common/Exception.h>
#include <Common/typeid_cast.h>
#include <Core/Defines.h>
Expand Down Expand Up @@ -122,3 +124,5 @@ void registerTableFunctionODBC(TableFunctionFactory & factory)
factory.registerFunction<TableFunctionODBC>();
}
}

#endif
5 changes: 5 additions & 0 deletions dbms/src/TableFunctions/TableFunctionODBC.h
@@ -1,5 +1,8 @@
#pragma once

#include <Common/config.h>
#if Poco_DataODBC_FOUND

#include <TableFunctions/ITableFunction.h>


Expand All @@ -20,3 +23,5 @@ class TableFunctionODBC : public ITableFunction
StoragePtr execute(const ASTPtr & ast_function, const Context & context) const override;
};
}

#endif
5 changes: 5 additions & 0 deletions dbms/src/TableFunctions/registerTableFunctions.cpp
Expand Up @@ -11,7 +11,9 @@ void registerTableFunctionRemote(TableFunctionFactory & factory);
void registerTableFunctionShardByHash(TableFunctionFactory & factory);
void registerTableFunctionNumbers(TableFunctionFactory & factory);
void registerTableFunctionCatBoostPool(TableFunctionFactory & factory);
#if Poco_DataODBC_FOUND
void registerTableFunctionODBC(TableFunctionFactory & factory);
#endif

#if USE_MYSQL
void registerTableFunctionMySQL(TableFunctionFactory & factory);
Expand All @@ -27,7 +29,10 @@ void registerTableFunctions()
registerTableFunctionShardByHash(factory);
registerTableFunctionNumbers(factory);
registerTableFunctionCatBoostPool(factory);

#if Poco_DataODBC_FOUND
registerTableFunctionODBC(factory);
#endif

#if USE_MYSQL
registerTableFunctionMySQL(factory);
Expand Down
5 changes: 5 additions & 0 deletions libs/libcommon/include/common/exp10.h
Expand Up @@ -8,6 +8,11 @@

#include <stdlib.h> /// for __THROW

// freebsd have no __THROW
#if !defined(__THROW)
#define __THROW
#endif

extern "C"
{

Expand Down