Freebsd build fixes (#5083)

This commit is contained in:
proller 2019-04-23 15:51:27 +03:00 committed by GitHub
parent 8d808aedf3
commit 29c3433322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 24 deletions

View File

@ -1,9 +1,8 @@
if (OS_FREEBSD) if (OS_FREEBSD)
find_library (EXECINFO_LIBRARY execinfo) find_library (EXECINFO_LIBRARY execinfo)
find_library (ELF_LIBRARY elf) find_library (ELF_LIBRARY elf)
message (STATUS "Using execinfo: ${EXECINFO_LIBRARY}") set (EXECINFO_LIBRARIES ${EXECINFO_LIBRARY} ${ELF_LIBRARY})
message (STATUS "Using elf: ${ELF_LIBRARY}") message (STATUS "Using execinfo: ${EXECINFO_LIBRARIES}")
else () else ()
set (EXECINFO_LIBRARY "") set (EXECINFO_LIBRARIES "")
set (ELF_LIBRARY "")
endif () endif ()

View File

@ -194,8 +194,7 @@ target_link_libraries (clickhouse_common_io
${CITYHASH_LIBRARIES} ${CITYHASH_LIBRARIES}
PRIVATE PRIVATE
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${EXECINFO_LIBRARY} ${EXECINFO_LIBRARIES}
${ELF_LIBRARY}
PUBLIC PUBLIC
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
PRIVATE PRIVATE

View File

@ -46,7 +46,7 @@ LLVMSupport
#PollyISL #PollyISL
#PollyPPCG #PollyPPCG
PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARY} Threads::Threads PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARIES} Threads::Threads
${MALLOC_LIBRARIES} ${MALLOC_LIBRARIES}
${GLIBC_COMPATIBILITY_LIBRARIES} ${GLIBC_COMPATIBILITY_LIBRARIES}
${MEMCPY_LIBRARIES} ${MEMCPY_LIBRARIES}

View File

@ -46,7 +46,7 @@ ${REQUIRED_LLVM_LIBRARIES}
#PollyISL #PollyISL
#PollyPPCG #PollyPPCG
PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARY} Threads::Threads PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARIES} Threads::Threads
${MALLOC_LIBRARIES} ${MALLOC_LIBRARIES}
${GLIBC_COMPATIBILITY_LIBRARIES} ${GLIBC_COMPATIBILITY_LIBRARIES}
${MEMCPY_LIBRARIES} ${MEMCPY_LIBRARIES}

View File

@ -42,7 +42,7 @@ lldCore
${REQUIRED_LLVM_LIBRARIES} ${REQUIRED_LLVM_LIBRARIES}
PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARY} Threads::Threads PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARIES} Threads::Threads
${MALLOC_LIBRARIES} ${MALLOC_LIBRARIES}
${GLIBC_COMPATIBILITY_LIBRARIES} ${GLIBC_COMPATIBILITY_LIBRARIES}
${MEMCPY_LIBRARIES} ${MEMCPY_LIBRARIES}

View File

@ -42,7 +42,7 @@ lldCore
${REQUIRED_LLVM_LIBRARIES} ${REQUIRED_LLVM_LIBRARIES}
PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARY} Threads::Threads PUBLIC ${ZLIB_LIBRARIES} ${EXECINFO_LIBRARIES} Threads::Threads
${MALLOC_LIBRARIES} ${MALLOC_LIBRARIES}
${GLIBC_COMPATIBILITY_LIBRARIES} ${GLIBC_COMPATIBILITY_LIBRARIES}
${MEMCPY_LIBRARIES} ${MEMCPY_LIBRARIES}

View File

@ -116,6 +116,7 @@ exit_code = 0
#def run_tests_array(all_tests, suite, suite_dir, suite_tmp_dir, run_total): #def run_tests_array(all_tests, suite, suite_dir, suite_tmp_dir, run_total):
def run_tests_array(all_tests_with_params): def run_tests_array(all_tests_with_params):
all_tests, suite, suite_dir, suite_tmp_dir, run_total = all_tests_with_params all_tests, suite, suite_dir, suite_tmp_dir, run_total = all_tests_with_params
global exit_code
global SERVER_DIED global SERVER_DIED
OP_SQUARE_BRACKET = colored("[", args, attrs=['bold']) OP_SQUARE_BRACKET = colored("[", args, attrs=['bold'])
@ -393,7 +394,7 @@ def main(args):
suite = suite_re_obj.group(1) suite = suite_re_obj.group(1)
if os.path.isdir(suite_dir): if os.path.isdir(suite_dir):
if 'stateful' in suite and not is_data_present(): if 'stateful' in suite and not args.no_stateful and not is_data_present():
print("Won't run stateful tests because test data wasn't loaded.") print("Won't run stateful tests because test data wasn't loaded.")
continue continue
if 'stateless' in suite and args.no_stateless: if 'stateless' in suite and args.no_stateless:

View File

@ -91,9 +91,13 @@ target_include_directories (common BEFORE PRIVATE ${CCTZ_INCLUDE_DIR})
target_include_directories (common PUBLIC ${COMMON_INCLUDE_DIR}) target_include_directories (common PUBLIC ${COMMON_INCLUDE_DIR})
if (NOT USE_INTERNAL_BOOST_LIBRARY) if (NOT USE_INTERNAL_BOOST_LIBRARY)
target_include_directories (common BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) target_include_directories (common SYSTEM BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
endif () endif ()
if(NOT USE_INTERNAL_POCO_LIBRARY)
target_include_directories (common SYSTEM BEFORE PUBLIC ${Poco_Foundation_INCLUDE_DIR})
endif()
target_link_libraries (common target_link_libraries (common
PUBLIC PUBLIC
${Poco_Foundation_LIBRARY} ${Poco_Foundation_LIBRARY}

View File

@ -22,4 +22,4 @@ endif ()
target_include_directories (daemon PUBLIC include) target_include_directories (daemon PUBLIC include)
target_link_libraries (daemon PRIVATE clickhouse_common_io clickhouse_common_config common ${Poco_Net_LIBRARY} ${Poco_Util_LIBRARY} ${EXECINFO_LIBRARY} ${ELF_LIBRARY}) target_link_libraries (daemon PRIVATE clickhouse_common_io clickhouse_common_config common ${Poco_Net_LIBRARY} ${Poco_Util_LIBRARY} ${EXECINFO_LIBRARIES})

View File

@ -1,17 +1,17 @@
option (ENABLE_MYSQL "Enable MySQL" ${OS_LINUX}) option(ENABLE_MYSQL "Enable MySQL" 1)
if (OS_LINUX) if(ENABLE_MYSQL)
option (USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED}) if(OS_LINUX)
else () option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
option (USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" OFF) else()
endif () option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" OFF)
endif()
if (USE_INTERNAL_MYSQL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README.md") if(USE_INTERNAL_MYSQL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README.md")
message (WARNING "submodule contrib/mariadb-connector-c is missing. to fix try run: \n git submodule update --init --recursive") message(WARNING "submodule contrib/mariadb-connector-c is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_MYSQL_LIBRARY 0) set(USE_INTERNAL_MYSQL_LIBRARY 0)
endif () endif()
if (ENABLE_MYSQL)
if (USE_INTERNAL_MYSQL_LIBRARY) if (USE_INTERNAL_MYSQL_LIBRARY)
set (MYSQLCLIENT_LIBRARIES mysqlclient) set (MYSQLCLIENT_LIBRARIES mysqlclient)
set (USE_MYSQL 1) set (USE_MYSQL 1)