Skip to content

Commit

Permalink
Fully rename project
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 authored and JaySon-Huang committed Jan 21, 2022
1 parent 522d4ac commit 4b182b2
Show file tree
Hide file tree
Showing 63 changed files with 147 additions and 147 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project (ClickHouse)
project (TiFlash)
cmake_minimum_required (VERSION 2.8)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${ClickHouse_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${TiFlash_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_MACOSX_RPATH 1)

message (STATUS "Using CXX=${CMAKE_CXX_COMPILER}, ver=${CMAKE_CXX_COMPILER_VERSION};CC=${CMAKE_C_COMPILER}, ver=${CMAKE_C_COMPILER_VERSION}")
Expand Down Expand Up @@ -266,9 +266,9 @@ endif ()

# when installing to /usr - place configs to /etc but for /usr/local place to /usr/local/etc
if (CMAKE_INSTALL_PREFIX STREQUAL "/usr")
set (CLICKHOUSE_ETC_DIR "/etc")
set (TIFLASH_ETC_DIR "/etc")
else ()
set (CLICKHOUSE_ETC_DIR "${CMAKE_INSTALL_PREFIX}/etc")
set (TIFLASH_ETC_DIR "${CMAKE_INSTALL_PREFIX}/etc")
endif ()

option (UNBUNDLED "Try find all libraries in system (if fail - use bundled from contrib/)" OFF)
Expand Down Expand Up @@ -354,9 +354,9 @@ endif()
include (cmake/print_flags.cmake)

# Directory for Yandex specific files
set (CLICKHOUSE_PRIVATE_DIR ${ClickHouse_SOURCE_DIR}/private/)
if (EXISTS ${CLICKHOUSE_PRIVATE_DIR})
add_subdirectory (${CLICKHOUSE_PRIVATE_DIR})
set (TIFLASH_PRIVATE_DIR ${TiFlash_SOURCE_DIR}/private/)
if (EXISTS ${TIFLASH_PRIVATE_DIR})
add_subdirectory (${TIFLASH_PRIVATE_DIR})
endif ()

# Enable tests by default when build type is debug
Expand Down
8 changes: 4 additions & 4 deletions cmake/find_boost.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
option (USE_INTERNAL_BOOST_LIBRARY "Set to FALSE to use system boost library instead of bundled" ${NOT_UNBUNDLED})

# Test random file existing in all package variants
if (USE_INTERNAL_BOOST_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/filesystem/src/path.cpp")
if (USE_INTERNAL_BOOST_LIBRARY AND NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/boost/libs/filesystem/src/path.cpp")
message (WARNING "submodules in contrib/boost is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_BOOST_LIBRARY 0)
endif ()
Expand Down Expand Up @@ -33,14 +33,14 @@ if (NOT Boost_SYSTEM_LIBRARY)
set (Boost_INCLUDE_DIRS)

# For boost from github:
file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/*/include")
file (GLOB Boost_INCLUDE_DIRS_ "${TiFlash_SOURCE_DIR}/contrib/boost/*/include")
list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_})
# numeric has additional level
file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/numeric/*/include")
file (GLOB Boost_INCLUDE_DIRS_ "${TiFlash_SOURCE_DIR}/contrib/boost/numeric/*/include")
list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_})

# For packaged version:
list (APPEND Boost_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/boost")
list (APPEND Boost_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/boost")

endif ()

Expand Down
6 changes: 3 additions & 3 deletions cmake/find_grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# sudo apt-get install libgrpc++-dev protobuf-compiler-grpc
option(USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})

if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
if(USE_INTERNAL_GRPC_LIBRARY)
message(WARNING "submodule contrib/grpc is missing. to fix try run: \n git submodule update --init")
message(WARNING "Can't use internal grpc")
Expand All @@ -27,11 +27,11 @@ if(NOT USE_INTERNAL_GRPC_LIBRARY)
endif()

if(NOT EXTERNAL_GRPC_LIBRARY_FOUND AND NOT MISSING_INTERNAL_GRPC_LIBRARY)
set(gRPC_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/grpc/include")
set(gRPC_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/grpc/include")
set(gRPC_LIBRARIES grpc grpc++)
set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)

include("${ClickHouse_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")
include("${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")

set(USE_INTERNAL_GRPC_LIBRARY 1)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/find_gtest.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})

if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
if (NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
if (USE_INTERNAL_GTEST_LIBRARY)
message (WARNING "submodule contrib/googletest is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_GTEST_LIBRARY 0)
Expand Down
4 changes: 2 additions & 2 deletions cmake/find_kvproto.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Currently kvproto should always use bundled library.

if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/kvproto/proto/errorpb.proto")
if (NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/kvproto/proto/errorpb.proto")
message (FATAL_ERROR "kvproto submodule in contrib/kvproto is missing. Try run 'git submodule update --init --recursive'")
endif ()

message(STATUS "Using kvproto: ${ClickHouse_SOURCE_DIR}/contrib/kvproto/cpp")
message(STATUS "Using kvproto: ${TiFlash_SOURCE_DIR}/contrib/kvproto/cpp")

set (KVPROTO_FOUND TRUE)
4 changes: 2 additions & 2 deletions cmake/find_lz4.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option (USE_INTERNAL_LZ4_LIBRARY "Set to FALSE to use system lz4 library instead of bundled" ${NOT_UNBUNDLED})

if (USE_INTERNAL_LZ4_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/lz4/lib/lz4.h")
if (USE_INTERNAL_LZ4_LIBRARY AND NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/lz4/lib/lz4.h")
message (WARNING "submodule contrib/lz4 is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_LZ4_LIBRARY 0)
endif ()
Expand All @@ -12,7 +12,7 @@ endif ()

if (LZ4_LIBRARY AND LZ4_INCLUDE_DIR)
else ()
set (LZ4_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/lz4/lib)
set (LZ4_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/lz4/lib)
set (USE_INTERNAL_LZ4_LIBRARY 1)
set (LZ4_LIBRARY lz4)
endif ()
Expand Down
14 changes: 7 additions & 7 deletions cmake/find_poco.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option (USE_INTERNAL_POCO_LIBRARY "Set to FALSE to use system poco library instead of bundled" ${NOT_UNBUNDLED})

if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/CMakeLists.txt")
if (NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/poco/CMakeLists.txt")
if (USE_INTERNAL_POCO_LIBRARY)
message (WARNING "submodule contrib/poco is missing. to fix try run: \n git submodule update --init --recursive")
endif ()
Expand Down Expand Up @@ -43,18 +43,18 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)

# used in internal compiler
list (APPEND Poco_INCLUDE_DIRS
"${ClickHouse_SOURCE_DIR}/contrib/poco/Foundation/include/"
"${ClickHouse_SOURCE_DIR}/contrib/poco/Util/include/"
"${TiFlash_SOURCE_DIR}/contrib/poco/Foundation/include/"
"${TiFlash_SOURCE_DIR}/contrib/poco/Util/include/"
)

if (NOT DEFINED POCO_ENABLE_MONGODB OR POCO_ENABLE_MONGODB)
set (Poco_MongoDB_FOUND 1)
set (Poco_MongoDB_LIBRARY PocoMongoDB)
set (Poco_MongoDB_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/MongoDB/include/")
set (Poco_MongoDB_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/poco/MongoDB/include/")
endif ()

set (Poco_Data_FOUND 1)
set (Poco_Data_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include")
set (Poco_Data_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/poco/Data/include")
set (Poco_Data_LIBRARY PocoData)

# TODO! fix internal ssl
Expand All @@ -66,8 +66,8 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)

if (USE_STATIC_LIBRARIES AND USE_INTERNAL_ZLIB_LIBRARY)
list (APPEND Poco_INCLUDE_DIRS
"${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
"${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
"${TiFlash_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
"${TiFlash_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
)
endif ()

Expand Down
2 changes: 1 addition & 1 deletion cmake/find_prometheus.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Currently prometheus cpp should always use bundled library.

message(STATUS "Using prometheus: ${ClickHouse_SOURCE_DIR}/contrib/prometheus-cpp")
message(STATUS "Using prometheus: ${TiFlash_SOURCE_DIR}/contrib/prometheus-cpp")

set (PROMETHEUS_CPP_FOUND TRUE)
6 changes: 3 additions & 3 deletions cmake/find_protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})

if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
if(USE_INTERNAL_PROTOBUF_LIBRARY)
message(WARNING "submodule contrib/protobuf is missing. to fix try run: \n git submodule update --init")
message(WARNING "Can't use internal protobuf")
Expand All @@ -27,12 +27,12 @@ if(NOT USE_INTERNAL_PROTOBUF_LIBRARY)
endif()

if(NOT EXTERNAL_PROTOBUF_LIBRARY_FOUND AND NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
set(Protobuf_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/protobuf/src")
set(Protobuf_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/protobuf/src")
set(Protobuf_LIBRARY libprotobuf)
set(Protobuf_PROTOC_EXECUTABLE "$<TARGET_FILE:protoc>")
set(Protobuf_PROTOC_LIBRARY libprotoc)

include("${ClickHouse_SOURCE_DIR}/contrib/protobuf-cmake/protobuf_generate.cmake")
include("${TiFlash_SOURCE_DIR}/contrib/protobuf-cmake/protobuf_generate.cmake")

set(USE_INTERNAL_PROTOBUF_LIBRARY 1)
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/find_raftstore_proxy.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set (TIFLASH_PROXY_LIB_PATH "${ClickHouse_SOURCE_DIR}/libs/libtiflash-proxy")
set (TIFLASH_PROXY_MODULE_PATH "${ClickHouse_SOURCE_DIR}/contrib/tiflash-proxy")
set (TIFLASH_PROXY_LIB_PATH "${TiFlash_SOURCE_DIR}/libs/libtiflash-proxy")
set (TIFLASH_PROXY_MODULE_PATH "${TiFlash_SOURCE_DIR}/contrib/tiflash-proxy")
set (TIFLASH_PROXY_FFI_SRC "${TIFLASH_PROXY_MODULE_PATH}/raftstore-proxy/ffi/src")

set (TIFLASH_PROXY_LIBRARY "TIFLASH_PROXY_LIBRARY-NOTFOUND")
Expand Down
4 changes: 2 additions & 2 deletions cmake/find_re2.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option (USE_INTERNAL_RE2_LIBRARY "Set to FALSE to use system re2 library instead of bundled [slower]" ON)

if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/re2/re2")
if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/re2/re2")
if(USE_INTERNAL_RE2_LIBRARY)
message(WARNING "submodule contrib/re2 is missing. to fix try run: \n git submodule update --init")
message (WARNING "Can't find internal re2 library")
Expand Down Expand Up @@ -28,7 +28,7 @@ if (RE2_LIBRARY AND RE2_INCLUDE_DIR)
elseif (NOT MISSING_INTERNAL_RE2_LIBRARY)
set (USE_INTERNAL_RE2_LIBRARY 1)
set (RE2_LIBRARY re2)
set (RE2_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/re2")
set (RE2_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/re2")
if (NOT MISSING_INTERNAL_RE2_ST_LIBRARY)
set (RE2_ST_LIBRARY re2_st)
set (USE_RE2_ST 1)
Expand Down
2 changes: 1 addition & 1 deletion cmake/find_sparsehash.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif ()
if (SPARCEHASH_INCLUDE_DIR)
else ()
set (USE_INTERNAL_SPARCEHASH_LIBRARY 1)
set (SPARCEHASH_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libsparsehash")
set (SPARCEHASH_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/libsparsehash")
endif ()

message (STATUS "Using sparsehash: ${SPARCEHASH_INCLUDE_DIR}")
2 changes: 1 addition & 1 deletion cmake/find_ssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif ()
if (NOT OPENSSL_FOUND)
message (WARNING "Try to use internal ssl library")
set (USE_INTERNAL_SSL_LIBRARY 1)
set (OPENSSL_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/ssl")
set (OPENSSL_ROOT_DIR "${TiFlash_SOURCE_DIR}/contrib/ssl")
set (OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include")
if (NOT USE_STATIC_LIBRARIES AND TARGET crypto-shared AND TARGET ssl-shared)
set (OPENSSL_CRYPTO_LIBRARY crypto-shared)
Expand Down
4 changes: 2 additions & 2 deletions cmake/find_tipb.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/tipb/proto/select.proto")
if (NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/tipb/proto/select.proto")
message (FATAL_ERROR "tipb submodule in contrib/tipb is missing. Try run 'git submodule update --init --recursive'")
endif ()

message(STATUS "Using tipb: ${ClickHouse_SOURCE_DIR}/contrib/tipb/cpp")
message(STATUS "Using tipb: ${TiFlash_SOURCE_DIR}/contrib/tipb/cpp")
6 changes: 3 additions & 3 deletions cmake/find_xxhash.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ if(NOT BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static library" FORCE)
endif()
add_subdirectory(
${ClickHouse_SOURCE_DIR}/contrib/xxHash/cmake_unofficial EXCLUDE_FROM_ALL)
${TiFlash_SOURCE_DIR}/contrib/xxHash/cmake_unofficial EXCLUDE_FROM_ALL)
if(ARCH_AMD64)
add_library(xxhash_dispatch STATIC ${ClickHouse_SOURCE_DIR}/contrib/xxHash/xxh_x86dispatch.c)
add_library(xxhash_dispatch STATIC ${TiFlash_SOURCE_DIR}/contrib/xxHash/xxh_x86dispatch.c)
target_link_libraries(xxhash_dispatch PUBLIC xxHash::xxhash)
set(TIFLASH_XXHASH_LIBRARY xxhash_dispatch)
else()
set(TIFLASH_XXHASH_LIBRARY xxHash::xxhash)
endif()
set(XXHASH_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/xxHash)
set(XXHASH_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/xxHash)

6 changes: 3 additions & 3 deletions cmake/find_zlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if (NOT ZLIB_FOUND)
set (INTERNAL_ZLIB_NAME "zlib-ng")
else ()
set (INTERNAL_ZLIB_NAME "zlib")
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
message (WARNING "Will use standard zlib, please clone manually:\n git clone https://github.com/madler/zlib.git ${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
if (NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
message (WARNING "Will use standard zlib, please clone manually:\n git clone https://github.com/madler/zlib.git ${TiFlash_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
endif ()
endif ()

Expand All @@ -24,7 +24,7 @@ if (NOT ZLIB_FOUND)
set(WITH_NEON 1 CACHE INTERNAL "")
set(WITH_ACLE 1 CACHE INTERNAL "")
endif ()
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}" "${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}") # generated zconf.h
set (ZLIB_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}" "${TiFlash_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}") # generated zconf.h
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
set (ZLIB_FOUND 1) # for poco
if (USE_STATIC_LIBRARIES)
Expand Down
2 changes: 1 addition & 1 deletion cmake/find_zstd.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library instead of bundled" ${NOT_UNBUNDLED})

if (USE_INTERNAL_ZSTD_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
if (USE_INTERNAL_ZSTD_LIBRARY AND NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
message (WARNING "submodule contrib/zstd is missing. to fix try run: \n git submodule update --init --recursive")
set (USE_INTERNAL_ZSTD_LIBRARY 0)
endif ()
Expand Down
12 changes: 6 additions & 6 deletions cmake/lib_name.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(DIVIDE_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libdivide)
set(CITYHASH_CONTRIB_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcityhash/include)
set(COMMON_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/libs/libcommon/include ${ClickHouse_BINARY_DIR}/libs/libcommon/include)
set(DBMS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/dbms/src ${ClickHouse_BINARY_DIR}/dbms/src)
set(DOUBLE_CONVERSION_CONTRIB_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/double-conversion)
set(PCG_RANDOM_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libpcg-random/include)
set(DIVIDE_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/libdivide)
set(CITYHASH_CONTRIB_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/libcityhash/include)
set(COMMON_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/libs/libcommon/include ${TiFlash_BINARY_DIR}/libs/libcommon/include)
set(DBMS_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/dbms/src ${TiFlash_BINARY_DIR}/dbms/src)
set(DOUBLE_CONVERSION_CONTRIB_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/double-conversion)
set(PCG_RANDOM_INCLUDE_DIR ${TiFlash_SOURCE_DIR}/contrib/libpcg-random/include)
2 changes: 1 addition & 1 deletion cmake/print_include_directories.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ endif ()
list(REMOVE_DUPLICATES dirs)
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/include_directories.txt "")
foreach (dir ${dirs})
string (REPLACE "${ClickHouse_SOURCE_DIR}" "." dir "${dir}")
string (REPLACE "${TiFlash_SOURCE_DIR}" "." dir "${dir}")
file (APPEND ${CMAKE_CURRENT_BINARY_DIR}/include_directories.txt "-I ${dir} ")
endforeach ()
4 changes: 2 additions & 2 deletions contrib/abseil-cpp-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set(ABSL_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/abseil-cpp")
set(ABSL_ROOT_DIR "${TiFlash_SOURCE_DIR}/contrib/abseil-cpp")
if(NOT EXISTS "${ABSL_ROOT_DIR}/CMakeLists.txt")
message(FATAL_ERROR " submodule third_party/abseil-cpp is missing. To fix try run: \n git submodule update --init --recursive")
endif()
set(BUILD_TESTING OFF)
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory("${ABSL_ROOT_DIR}" "${ClickHouse_BINARY_DIR}/contrib/abseil-cpp")
add_subdirectory("${ABSL_ROOT_DIR}" "${TiFlash_BINARY_DIR}/contrib/abseil-cpp")

add_library(abseil_swiss_tables INTERFACE)

Expand Down
2 changes: 1 addition & 1 deletion contrib/boost-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Important boost patch: 094c18b
#

set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/boost)
set (LIBRARY_DIR ${TiFlash_SOURCE_DIR}/contrib/boost)

if (NOT MSVC)
add_definitions(-Wno-unused-variable -Wno-deprecated-declarations)
Expand Down
2 changes: 1 addition & 1 deletion contrib/boost-cmake/context.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (BOOST_CONTEXT_LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/boost/libs/context)
set (BOOST_CONTEXT_LIBRARY_DIR ${TiFlash_SOURCE_DIR}/contrib/boost/libs/context)

# Build features

Expand Down
2 changes: 1 addition & 1 deletion contrib/boost-cmake/fiber.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (BOOST_FIBER_LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/boost/libs/fiber)
set (BOOST_FIBER_LIBRARY_DIR ${TiFlash_SOURCE_DIR}/contrib/boost/libs/fiber)

if(WIN32 AND NOT CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
set(_default_target windows)
Expand Down
2 changes: 1 addition & 1 deletion contrib/cctz-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET(LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/cctz)
SET(LIBRARY_DIR ${TiFlash_SOURCE_DIR}/contrib/cctz)

add_library(cctz
${LIBRARY_DIR}/src/civil_time_detail.cc
Expand Down
6 changes: 3 additions & 3 deletions contrib/grpc-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(_gRPC_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc")
set(_gRPC_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/grpc")
set(_gRPC_SOURCE_DIR "${TiFlash_SOURCE_DIR}/contrib/grpc")
set(_gRPC_BINARY_DIR "${TiFlash_BINARY_DIR}/contrib/grpc")

# Use re2 from ClickHouse contrib, not from gRPC third_party.
if(NOT RE2_INCLUDE_DIR)
Expand Down Expand Up @@ -76,4 +76,4 @@ add_subdirectory("${_gRPC_SOURCE_DIR}" "${_gRPC_BINARY_DIR}")

# The contrib/grpc/CMakeLists.txt redefined the PROTOBUF_GENERATE_GRPC_CPP() function for its own purposes,
# so we need to redefine it back.
include("${ClickHouse_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")
include("${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")
2 changes: 1 addition & 1 deletion contrib/jemalloc-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
message (WARNING "jemalloc support on non-linux is EXPERIMENTAL")
endif()

set(JEMALLOC_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/jemalloc)
set(JEMALLOC_SOURCE_DIR ${TiFlash_SOURCE_DIR}/contrib/jemalloc)

set(SRCS
${JEMALLOC_SOURCE_DIR}/src/arena.c
Expand Down
2 changes: 1 addition & 1 deletion contrib/libunwind-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
enable_language(ASM)

set(LIBUNWIND_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libunwind")
set(LIBUNWIND_SOURCE_DIR "${TiFlash_SOURCE_DIR}/contrib/libunwind")
if(ARCH_LINUX)
set(UNWIND_OS "linux")
elseif(ARCH_FREEBSD)
Expand Down
2 changes: 1 addition & 1 deletion contrib/lz4-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET(LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/lz4/lib)
SET(LIBRARY_DIR ${TiFlash_SOURCE_DIR}/contrib/lz4/lib)

add_library (lz4
${LIBRARY_DIR}/lz4.c
Expand Down
4 changes: 2 additions & 2 deletions contrib/protobuf-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(protobuf_source_dir "${ClickHouse_SOURCE_DIR}/contrib/protobuf")
set(protobuf_binary_dir "${ClickHouse_BINARY_DIR}/contrib/protobuf")
set(protobuf_source_dir "${TiFlash_SOURCE_DIR}/contrib/protobuf")
set(protobuf_binary_dir "${TiFlash_BINARY_DIR}/contrib/protobuf")


add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD)
Expand Down
Loading

0 comments on commit 4b182b2

Please sign in to comment.