未验证 提交 1ae249ad 编写于 作者: C Cai Yudong 提交者: GitHub

Update profiler CMakeLists.txt (#13001)

Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 59c93eb3
......@@ -44,5 +44,6 @@ target_link_libraries(milvus_segcore
milvus_proto
milvus_query
milvus_utils
# gperftools
)
......@@ -42,7 +42,7 @@ find_package( Threads REQUIRED )
if ( MILVUS_BUILD_TESTS )
add_subdirectory( gtest )
add_subdirectory( google_benchmark )
add_subdirectory( profilers )
add_subdirectory( profiler )
endif()
......
......@@ -85,12 +85,12 @@ macro( build_gperftools )
ExternalProject_Get_Property( gperftools_ep INSTALL_DIR )
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
# libprofiler.a
add_library( gperftools STATIC IMPORTED )
# libprofiler.so
add_library( gperftools SHARED IMPORTED )
set_target_properties( gperftools
PROPERTIES
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_LINK_LIBRARIES libunwind
)
......@@ -100,3 +100,6 @@ endmacro()
build_libunwind()
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
log
pthread
gperftools
)
target_link_libraries(all_tests
......@@ -69,7 +68,6 @@ target_link_libraries(all_tests
milvus_indexbuilder
log
pthread
gperftools
)
install(TARGETS all_tests DESTINATION unittest)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册