Mark dependencies as PRIVATE and fix missing dependencies in tools. (#6790)
Summary: Tools were mistakenly using leaked (PUBLIC) dependencies from main lib. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6790 Reviewed By: riversand963 Differential Revision: D21471551 fbshipit-source-id: ec43b92e231777e0fcf0f865444391af09d6963b
This commit is contained in:
parent
4a4b8a1344
commit
07204837ce
@ -853,12 +853,12 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES})
|
add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES})
|
||||||
target_link_libraries(${ROCKSDB_STATIC_LIB}
|
target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE
|
||||||
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
||||||
|
|
||||||
if(ROCKSDB_BUILD_SHARED)
|
if(ROCKSDB_BUILD_SHARED)
|
||||||
add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
|
add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
|
||||||
target_link_libraries(${ROCKSDB_SHARED_LIB}
|
target_link_libraries(${ROCKSDB_SHARED_LIB} PRIVATE
|
||||||
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -10,5 +10,5 @@ add_executable(db_stress${ARTIFACT_SUFFIX}
|
|||||||
db_stress_gflags.cc
|
db_stress_gflags.cc
|
||||||
db_stress_tool.cc
|
db_stress_tool.cc
|
||||||
no_batched_ops_stress.cc)
|
no_batched_ops_stress.cc)
|
||||||
target_link_libraries(db_stress${ARTIFACT_SUFFIX} ${ROCKSDB_LIB})
|
target_link_libraries(db_stress${ARTIFACT_SUFFIX} ${ROCKSDB_LIB} ${THIRDPARTY_LIBS})
|
||||||
list(APPEND tool_deps db_stress)
|
list(APPEND tool_deps db_stress)
|
||||||
|
@ -20,7 +20,7 @@ if(WITH_TOOLS)
|
|||||||
get_filename_component(exename ${src} NAME_WE)
|
get_filename_component(exename ${src} NAME_WE)
|
||||||
add_executable(${exename}${ARTIFACT_SUFFIX}
|
add_executable(${exename}${ARTIFACT_SUFFIX}
|
||||||
${src})
|
${src})
|
||||||
target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB})
|
target_link_libraries(${exename}${ARTIFACT_SUFFIX} ${ROCKSDB_LIB} ${THIRDPARTY_LIBS})
|
||||||
list(APPEND tool_deps ${exename})
|
list(APPEND tool_deps ${exename})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user