2020-09-15 10:00:00 +08:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
|
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
|
|
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Using default c and cxx compiler in our build tree
|
|
|
|
# Thirdpart cxx and c flags
|
|
|
|
add_compile_options( -O3 -fPIC -Wno-error -fopenmp )
|
|
|
|
|
|
|
|
if ( NOT KNOWHERE_VERBOSE_THIRDPARTY_BUILD )
|
|
|
|
set( EP_LOG_OPTIONS LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 LOG_DOWNLOAD 1 )
|
|
|
|
else ()
|
|
|
|
set( EP_LOG_OPTIONS )
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
set( MAKE_BUILD_ARGS "-j6" )
|
|
|
|
|
|
|
|
include( FetchContent )
|
|
|
|
set( FETCHCONTENT_BASE_DIR ${MILVUS_BINARY_DIR}/3rdparty_download )
|
|
|
|
set( FETCHCONTENT_QUIET OFF )
|
|
|
|
|
2020-12-08 18:51:07 +08:00
|
|
|
if( CUSTOM_THIRDPARTY_DOWNLOAD_PATH )
|
|
|
|
set( THIRDPARTY_DOWNLOAD_PATH ${CUSTOM_THIRDPARTY_DOWNLOAD_PATH} )
|
|
|
|
else()
|
|
|
|
set( THIRDPARTY_DOWNLOAD_PATH ${CMAKE_BINARY_DIR}/3rdparty_download/download )
|
|
|
|
endif()
|
|
|
|
message( STATUS "Thirdparty downloaded file path: ${THIRDPARTY_DOWNLOAD_PATH}" )
|
2020-09-15 10:00:00 +08:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Find pthreads
|
|
|
|
|
|
|
|
set( THREADS_PREFER_PTHREAD_FLAG ON )
|
|
|
|
find_package( Threads REQUIRED )
|
|
|
|
|
2022-02-09 14:27:46 +08:00
|
|
|
add_subdirectory( knowhere )
|
|
|
|
|
2020-10-27 15:51:16 +08:00
|
|
|
# ****************************** Thirdparty googletest ***************************************
|
2022-02-09 14:27:46 +08:00
|
|
|
if ( MILVUS_BUILD_TESTS)
|
2020-10-27 15:51:16 +08:00
|
|
|
add_subdirectory( gtest )
|
2021-10-13 17:06:33 +08:00
|
|
|
add_subdirectory( google_benchmark )
|
2022-02-09 14:27:46 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if ( MILVUS_BUILD_TESTS AND LINUX )
|
2021-12-08 23:23:06 +08:00
|
|
|
add_subdirectory( profiler )
|
2020-10-27 15:51:16 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2020-09-15 10:00:00 +08:00
|
|
|
# ****************************** Thirdparty yaml ***************************************
|
2021-03-04 17:09:48 +08:00
|
|
|
add_subdirectory( yaml-cpp )
|
2020-09-15 10:00:00 +08:00
|
|
|
|
|
|
|
# ****************************** Thirdparty opentracing ***************************************
|
|
|
|
if ( MILVUS_WITH_OPENTRACING )
|
|
|
|
add_subdirectory( opentracing )
|
2020-09-21 15:10:54 +08:00
|
|
|
|
2022-06-24 21:12:15 +08:00
|
|
|
endif()
|
2020-09-21 15:10:54 +08:00
|
|
|
add_subdirectory( protobuf )
|
2022-04-01 15:31:29 +08:00
|
|
|
add_subdirectory( boost_ext )
|
2022-05-22 20:03:58 +08:00
|
|
|
add_subdirectory( arrow )
|
2022-06-24 21:12:15 +08:00
|
|
|
add_subdirectory( rocksdb )
|
2022-09-09 22:12:34 +08:00
|
|
|
#add_subdirectory( aws_sdk )
|
2022-04-01 15:31:29 +08:00
|
|
|
|
|
|
|
# ******************************* Thridparty marisa ********************************
|
2022-05-31 13:28:02 +08:00
|
|
|
# TODO: support win.
|
|
|
|
if ( LINUX OR APPLE)
|
2022-04-01 15:31:29 +08:00
|
|
|
add_subdirectory( marisa )
|
2022-06-10 11:24:08 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# ******************************* Thridparty jemalloc ********************************
|
2022-06-17 17:46:10 +08:00
|
|
|
if ( LINUX )
|
2022-07-20 22:22:31 +08:00
|
|
|
add_subdirectory( jemalloc )
|
2022-06-17 17:46:10 +08:00
|
|
|
endif()
|
2022-07-20 22:22:31 +08:00
|
|
|
|
|
|
|
# ******************************* Thridparty rapidxml ********************************
|
|
|
|
#if ( LINUX )
|
|
|
|
# add_subdirectory( rapidxml )
|
|
|
|
#endif()
|