mirror of https://github.com/milvus-io/milvus.git
MS-248 fix profiler build error
Former-commit-id: 817200ab3a01e34553090b8074726ea47f8fd7d8pull/191/head
parent
33d6250e31
commit
29a177d129
cpp
|
@ -1676,14 +1676,18 @@ macro(build_gperftools)
|
||||||
BUILD_BYPRODUCTS
|
BUILD_BYPRODUCTS
|
||||||
${GPERFTOOLS_STATIC_LIB})
|
${GPERFTOOLS_STATIC_LIB})
|
||||||
|
|
||||||
|
ExternalProject_Add_StepDependencies(gperftools_ep build libunwind_ep)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${GPERFTOOLS_INCLUDE_DIR}")
|
file(MAKE_DIRECTORY "${GPERFTOOLS_INCLUDE_DIR}")
|
||||||
|
|
||||||
add_library(gperftools SHARED IMPORTED)
|
add_library(gperftools STATIC IMPORTED)
|
||||||
set_target_properties(gperftools
|
set_target_properties(gperftools
|
||||||
PROPERTIES IMPORTED_LOCATION "${GPERFTOOLS_STATIC_LIB}"
|
PROPERTIES IMPORTED_LOCATION "${GPERFTOOLS_STATIC_LIB}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}")
|
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
|
||||||
|
INTERFACE_LINK_LIBRARIES libunwind)
|
||||||
|
|
||||||
add_dependencies(gperftools gperftools_ep)
|
add_dependencies(gperftools gperftools_ep)
|
||||||
|
add_dependencies(gperftools libunwind_ep)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
if(MILVUS_WITH_GPERFTOOLS)
|
if(MILVUS_WITH_GPERFTOOLS)
|
||||||
|
@ -1692,4 +1696,5 @@ if(MILVUS_WITH_GPERFTOOLS)
|
||||||
# TODO: Don't use global includes but rather target_include_directories
|
# TODO: Don't use global includes but rather target_include_directories
|
||||||
get_target_property(GPERFTOOLS_INCLUDE_DIR gperftools INTERFACE_INCLUDE_DIRECTORIES)
|
get_target_property(GPERFTOOLS_INCLUDE_DIR gperftools INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
include_directories(SYSTEM ${GPERFTOOLS_INCLUDE_DIR})
|
include_directories(SYSTEM ${GPERFTOOLS_INCLUDE_DIR})
|
||||||
|
link_directories(SYSTEM ${GPERFTOOLS_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -63,10 +63,6 @@ include_directories("${CUDA_TOOLKIT_ROOT_DIR}/include")
|
||||||
include_directories(thrift/gen-cpp)
|
include_directories(thrift/gen-cpp)
|
||||||
include_directories(/usr/include/mysql)
|
include_directories(/usr/include/mysql)
|
||||||
|
|
||||||
if (MILVUS_ENABLE_PROFILING STREQUAL "ON")
|
|
||||||
SET(PROFILER_LIB profiler)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(third_party_libs
|
set(third_party_libs
|
||||||
easyloggingpp
|
easyloggingpp
|
||||||
sqlite
|
sqlite
|
||||||
|
@ -85,7 +81,6 @@ set(third_party_libs
|
||||||
zlib
|
zlib
|
||||||
zstd
|
zstd
|
||||||
mysqlpp
|
mysqlpp
|
||||||
${PROFILER_LIB}
|
|
||||||
${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs/libnvidia-ml.so
|
${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs/libnvidia-ml.so
|
||||||
cudart
|
cudart
|
||||||
)
|
)
|
||||||
|
@ -103,6 +98,12 @@ else()
|
||||||
openblas)
|
openblas)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (MILVUS_ENABLE_PROFILING STREQUAL "ON")
|
||||||
|
set(third_party_libs ${third_party_libs}
|
||||||
|
gperftools
|
||||||
|
libunwind)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (GPU_VERSION STREQUAL "ON")
|
if (GPU_VERSION STREQUAL "ON")
|
||||||
link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64")
|
link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64")
|
||||||
set(engine_libs
|
set(engine_libs
|
||||||
|
|
Loading…
Reference in New Issue