mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
Update profiler CMakeLists.txt (#13001)
Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
This commit is contained in:
parent
59c93eb351
commit
1ae249adb5
@ -44,5 +44,6 @@ target_link_libraries(milvus_segcore
|
|||||||
milvus_proto
|
milvus_proto
|
||||||
milvus_query
|
milvus_query
|
||||||
milvus_utils
|
milvus_utils
|
||||||
|
# gperftools
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
2
internal/core/thirdparty/CMakeLists.txt
vendored
2
internal/core/thirdparty/CMakeLists.txt
vendored
@ -42,7 +42,7 @@ find_package( Threads REQUIRED )
|
|||||||
if ( MILVUS_BUILD_TESTS )
|
if ( MILVUS_BUILD_TESTS )
|
||||||
add_subdirectory( gtest )
|
add_subdirectory( gtest )
|
||||||
add_subdirectory( google_benchmark )
|
add_subdirectory( google_benchmark )
|
||||||
add_subdirectory( profilers )
|
add_subdirectory( profiler )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -85,12 +85,12 @@ macro( build_gperftools )
|
|||||||
|
|
||||||
ExternalProject_Get_Property( gperftools_ep INSTALL_DIR )
|
ExternalProject_Get_Property( gperftools_ep INSTALL_DIR )
|
||||||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
||||||
# libprofiler.a
|
# libprofiler.so
|
||||||
add_library( gperftools STATIC IMPORTED )
|
add_library( gperftools SHARED IMPORTED )
|
||||||
set_target_properties( gperftools
|
set_target_properties( gperftools
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
IMPORTED_GLOBAL TRUE
|
IMPORTED_GLOBAL TRUE
|
||||||
IMPORTED_LOCATION "${INSTALL_DIR}/lib/libtcmalloc_and_profiler.a"
|
IMPORTED_LOCATION "${INSTALL_DIR}/lib/libtcmalloc_and_profiler.so"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${INSTALL_DIR}/include"
|
INTERFACE_INCLUDE_DIRECTORIES "${INSTALL_DIR}/include"
|
||||||
INTERFACE_LINK_LIBRARIES libunwind
|
INTERFACE_LINK_LIBRARIES libunwind
|
||||||
)
|
)
|
||||||
@ -100,3 +100,6 @@ endmacro()
|
|||||||
|
|
||||||
build_libunwind()
|
build_libunwind()
|
||||||
build_gperftools()
|
build_gperftools()
|
||||||
|
get_target_property( GPERFTOOLS_LIB gperftools LOCATION )
|
||||||
|
install(FILES ${GPERFTOOLS_LIB} DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
@ -60,7 +60,6 @@ target_link_libraries(index_builder_test
|
|||||||
milvus_indexbuilder
|
milvus_indexbuilder
|
||||||
log
|
log
|
||||||
pthread
|
pthread
|
||||||
gperftools
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(all_tests
|
target_link_libraries(all_tests
|
||||||
@ -69,7 +68,6 @@ target_link_libraries(all_tests
|
|||||||
milvus_indexbuilder
|
milvus_indexbuilder
|
||||||
log
|
log
|
||||||
pthread
|
pthread
|
||||||
gperftools
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS all_tests DESTINATION unittest)
|
install(TARGETS all_tests DESTINATION unittest)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user