mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
change cmakelist
Former-commit-id: 9a60b9fb71226b5b15e7bb2b755ff2ad53e6d922
This commit is contained in:
parent
d9310ff5e5
commit
8fdef361b1
@ -19,7 +19,6 @@ set(MILVUS_THIRDPARTY_DEPENDENCIES
|
||||
ARROW
|
||||
BOOST
|
||||
BZip2
|
||||
# Easylogging++
|
||||
FAISS
|
||||
GTest
|
||||
Knowhere
|
||||
@ -56,8 +55,6 @@ macro(build_dependency DEPENDENCY_NAME)
|
||||
build_arrow()
|
||||
elseif("${DEPENDENCY_NAME}" STREQUAL "BZip2")
|
||||
build_bzip2()
|
||||
# elseif("${DEPENDENCY_NAME}" STREQUAL "Easylogging++")
|
||||
# build_easyloggingpp()
|
||||
elseif("${DEPENDENCY_NAME}" STREQUAL "FAISS")
|
||||
build_faiss()
|
||||
elseif ("${DEPENDENCY_NAME}" STREQUAL "GTest")
|
||||
@ -295,13 +292,6 @@ else()
|
||||
endif()
|
||||
set(BZIP2_MD5 "00b516f4704d4a7cb50a1d97e6e8e15b")
|
||||
|
||||
#if(DEFINED ENV{MILVUS_EASYLOGGINGPP_URL})
|
||||
# set(EASYLOGGINGPP_SOURCE_URL "$ENV{MILVUS_EASYLOGGINGPP_URL}")
|
||||
#else()
|
||||
# set(EASYLOGGINGPP_SOURCE_URL "https://github.com/zuhd-org/easyloggingpp/archive/${EASYLOGGINGPP_VERSION}.tar.gz")
|
||||
#endif()
|
||||
#set(EASYLOGGINGPP_MD5 "b78cd319db4be9b639927657b8aa7732")
|
||||
|
||||
if(DEFINED ENV{MILVUS_FAISS_URL})
|
||||
set(FAISS_SOURCE_URL "$ENV{MILVUS_FAISS_URL}")
|
||||
else()
|
||||
@ -814,84 +804,6 @@ if(MILVUS_WITH_KNOWHERE)
|
||||
include_directories(SYSTEM "${KNOWHERE_INCLUDE_DIR}/SPTAG/AnnService")
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Easylogging++
|
||||
|
||||
#macro(build_easyloggingpp)
|
||||
# message(STATUS "Building Easylogging++-${EASYLOGGINGPP_VERSION} from source")
|
||||
# set(EASYLOGGINGPP_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/easyloggingpp_ep-prefix/src/easyloggingpp_ep")
|
||||
# set(EASYLOGGINGPP_INCLUDE_DIR "${EASYLOGGINGPP_PREFIX}/include")
|
||||
# set(EASYLOGGINGPP_STATIC_LIB
|
||||
# "${EASYLOGGINGPP_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}easyloggingpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
#
|
||||
# set(EASYLOGGINGPP_CMAKE_ARGS
|
||||
# ${EP_COMMON_CMAKE_ARGS}
|
||||
# "-DCMAKE_INSTALL_PREFIX=${EASYLOGGINGPP_PREFIX}"
|
||||
# -DCMAKE_INSTALL_LIBDIR=lib
|
||||
# -Dtest=OFF
|
||||
# -Dbuild_static_lib=ON)
|
||||
#
|
||||
# if(USE_JFROG_CACHE STREQUAL "ON")
|
||||
# set(EASYLOGGINGPP_CACHE_PACKAGE_NAME "easyloggingpp_${EASYLOGGINGPP_MD5}.tar.gz")
|
||||
# set(EASYLOGGINGPP_CACHE_URL "${JFROG_ARTFACTORY_CACHE_URL}/${EASYLOGGINGPP_CACHE_PACKAGE_NAME}")
|
||||
# set(EASYLOGGINGPP_CACHE_PACKAGE_PATH "${THIRDPARTY_PACKAGE_CACHE}/${EASYLOGGINGPP_CACHE_PACKAGE_NAME}")
|
||||
#
|
||||
# execute_process(COMMAND wget -q --method HEAD ${EASYLOGGINGPP_CACHE_URL} RESULT_VARIABLE return_code)
|
||||
# message(STATUS "Check the remote cache file ${EASYLOGGINGPP_CACHE_URL}. return code = ${return_code}")
|
||||
# if (NOT return_code EQUAL 0)
|
||||
# externalproject_add(easyloggingpp_ep
|
||||
# URL
|
||||
# ${EASYLOGGINGPP_SOURCE_URL}
|
||||
# ${EP_LOG_OPTIONS}
|
||||
# CMAKE_ARGS
|
||||
# ${EASYLOGGINGPP_CMAKE_ARGS}
|
||||
# BUILD_COMMAND
|
||||
# ${MAKE}
|
||||
# ${MAKE_BUILD_ARGS}
|
||||
# BUILD_BYPRODUCTS
|
||||
# ${EASYLOGGINGPP_STATIC_LIB})
|
||||
#
|
||||
# ExternalProject_Create_Cache(easyloggingpp_ep ${EASYLOGGINGPP_CACHE_PACKAGE_PATH} "${CMAKE_CURRENT_BINARY_DIR}/easyloggingpp_ep-prefix" ${JFROG_USER_NAME} ${JFROG_PASSWORD} ${EASYLOGGINGPP_CACHE_URL})
|
||||
# else()
|
||||
# file(DOWNLOAD ${EASYLOGGINGPP_CACHE_URL} ${EASYLOGGINGPP_CACHE_PACKAGE_PATH} STATUS status)
|
||||
# list(GET status 0 status_code)
|
||||
# message(STATUS "DOWNLOADING FROM ${EASYLOGGINGPP_CACHE_URL} TO ${EASYLOGGINGPP_CACHE_PACKAGE_PATH}. STATUS = ${status_code}")
|
||||
# if (status_code EQUAL 0)
|
||||
# ExternalProject_Use_Cache(easyloggingpp_ep ${EASYLOGGINGPP_CACHE_PACKAGE_PATH} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# endif()
|
||||
# endif()
|
||||
# else()
|
||||
# externalproject_add(easyloggingpp_ep
|
||||
# URL
|
||||
# ${EASYLOGGINGPP_SOURCE_URL}
|
||||
# ${EP_LOG_OPTIONS}
|
||||
# CMAKE_ARGS
|
||||
# ${EASYLOGGINGPP_CMAKE_ARGS}
|
||||
# BUILD_COMMAND
|
||||
# ${MAKE}
|
||||
# ${MAKE_BUILD_ARGS}
|
||||
# BUILD_BYPRODUCTS
|
||||
# ${EASYLOGGINGPP_STATIC_LIB})
|
||||
# endif()
|
||||
#
|
||||
# file(MAKE_DIRECTORY "${EASYLOGGINGPP_INCLUDE_DIR}")
|
||||
# add_library(easyloggingpp STATIC IMPORTED)
|
||||
# set_target_properties(
|
||||
# easyloggingpp
|
||||
# PROPERTIES IMPORTED_LOCATION "${EASYLOGGINGPP_STATIC_LIB}"
|
||||
# INTERFACE_INCLUDE_DIRECTORIES "${EASYLOGGINGPP_INCLUDE_DIR}")
|
||||
#
|
||||
# add_dependencies(easyloggingpp easyloggingpp_ep)
|
||||
#endmacro()
|
||||
#
|
||||
#if(MILVUS_WITH_EASYLOGGINGPP)
|
||||
# resolve_dependency(Easylogging++)
|
||||
#
|
||||
# get_target_property(EASYLOGGINGPP_INCLUDE_DIR easyloggingpp INTERFACE_INCLUDE_DIRECTORIES)
|
||||
# link_directories(SYSTEM "${EASYLOGGINGPP_PREFIX}/lib")
|
||||
# include_directories(SYSTEM "${EASYLOGGINGPP_INCLUDE_DIR}")
|
||||
#endif()
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# OpenBLAS
|
||||
|
||||
|
@ -95,7 +95,6 @@ set(client_grpc_lib
|
||||
|
||||
set(third_party_libs
|
||||
knowhere
|
||||
# easyloggingpp
|
||||
sqlite
|
||||
${client_grpc_lib}
|
||||
yaml-cpp
|
||||
@ -146,7 +145,6 @@ target_link_libraries(milvus_engine ${engine_libs} ${third_party_libs})
|
||||
add_library(metrics STATIC ${metrics_files})
|
||||
|
||||
set(metrics_lib
|
||||
# easyloggingpp
|
||||
yaml-cpp
|
||||
prometheus-cpp-push
|
||||
prometheus-cpp-pull
|
||||
|
@ -48,31 +48,25 @@ void RolloutHandler(const char *filename, std::size_t size, el::Level level) {
|
||||
int ret;
|
||||
std::string m(std::string(dir) + "/" + s);
|
||||
s = m;
|
||||
if(level == el::Level::Global){
|
||||
if (level == el::Level::Global) {
|
||||
s.append("." + std::to_string(++global_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else if(level == el::Level::Debug){
|
||||
} else if (level == el::Level::Debug) {
|
||||
s.append("." + std::to_string(++debug_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else if(level == el::Level::Warning){
|
||||
} else if (level == el::Level::Warning) {
|
||||
s.append("." + std::to_string(++warning_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else if(level == el::Level::Trace){
|
||||
} else if (level == el::Level::Trace) {
|
||||
s.append("." + std::to_string(++trace_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else if(level == el::Level::Error){
|
||||
} else if (level == el::Level::Error) {
|
||||
s.append("." + std::to_string(++error_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else if(level == el::Level::Fatal){
|
||||
} else if (level == el::Level::Fatal) {
|
||||
s.append("." + std::to_string(++fatal_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
s.append("." + std::to_string(++global_idx));
|
||||
ret = rename(m.c_str(), s.c_str());
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ set(unittest_libs
|
||||
gmock
|
||||
gtest_main
|
||||
gmock_main
|
||||
# easyloggingpp
|
||||
pthread
|
||||
metrics
|
||||
gfortran
|
||||
|
Loading…
Reference in New Issue
Block a user