@ -107,6 +107,7 @@ else()
endif ( )
endif ( )
set ( GFLAGS_LIB )
if ( WITH_GFLAGS )
# C o n f i g w i t h n a m e s p a c e a v a i l a b l e s i n c e g f l a g s 2 . 2 . 2
option ( GFLAGS_USE_TARGET_NAMESPACE "Use gflags import target with namespace." ON )
@ -114,15 +115,17 @@ else()
if ( gflags_FOUND )
if ( TARGET ${ GFLAGS_TARGET } )
# C o n f i g w i t h G F L A G S _ T A R G E T a v a i l a b l e s i n c e g f l a g s 2 . 2 . 0
list ( APPEND THIRDPARTY_LIBS ${ GFLAGS_TARGET } )
set ( GFLAGS_LIB ${ GFLAGS_TARGET } )
else ( )
# C o n f i g w i t h G F L A G S _ L I B R A R I E S a v a i l a b l e s i n c e g f l a g s 2 . 1 . 0
list ( APPEND THIRDPARTY_LIBS ${ GFLAGS_LIBRARIES } )
set ( GFLAGS_LIB ${ GFLAGS_LIBRARIES } )
endif ( )
else ( )
find_package ( gflags REQUIRED )
list ( APPEND THIRDPARTY_LIBS gflags::gflags )
set ( GFLAGS_LIB gflags::gflags )
endif ( )
include_directories ( ${ GFLAGS_INCLUDE_DIR } )
list ( APPEND THIRDPARTY_LIBS ${ GFLAGS_LIB } )
add_definitions ( -DGFLAGS=1 )
endif ( )
@ -1189,7 +1192,7 @@ if(WITH_TESTS)
E X C L U D E _ F R O M _ D E F A U L T _ B U I L D _ R E L W I T H D E B I N F O 1
O U T P U T _ N A M E $ { e x e n a m e } $ { A R T I F A C T _ S U F F I X }
)
target_link_libraries ( ${ CMAKE_PROJECT_NAME } _ ${ exename } ${ ARTIFACT_SUFFIX } testutillib ${ ARTIFACT_SUFFIX } testharness gtest ${ ROCKSDB_LIB } )
target_link_libraries ( ${ CMAKE_PROJECT_NAME } _ ${ exename } ${ ARTIFACT_SUFFIX } testutillib ${ ARTIFACT_SUFFIX } testharness gtest ${ GFLAGS_LIB } ${ ROCKSDB_LIB } )
if ( NOT "${exename}" MATCHES "db_sanity_test" )
add_test ( NAME ${ exename } COMMAND ${ exename } ${ ARTIFACT_SUFFIX } )
add_dependencies ( check ${ CMAKE_PROJECT_NAME } _ ${ exename } ${ ARTIFACT_SUFFIX } )
@ -1226,37 +1229,37 @@ if(WITH_BENCHMARK_TOOLS)
t o o l s / d b _ b e n c h . c c
t o o l s / d b _ b e n c h _ t o o l . c c )
target_link_libraries ( db_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
add_executable ( cache_bench
c a c h e / c a c h e _ b e n c h . c c )
target_link_libraries ( cache_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
add_executable ( memtablerep_bench
m e m t a b l e / m e m t a b l e r e p _ b e n c h . c c )
target_link_libraries ( memtablerep_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
add_executable ( range_del_aggregator_bench
d b / r a n g e _ d e l _ a g g r e g a t o r _ b e n c h . c c )
target_link_libraries ( range_del_aggregator_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
add_executable ( table_reader_bench
t a b l e / t a b l e _ r e a d e r _ b e n c h . c c )
target_link_libraries ( table_reader_bench
$ { R O C K S D B _ L I B } t e s t h a r n e s s )
$ { R O C K S D B _ L I B } t e s t h a r n e s s $ { G F L A G S _ L I B } )
add_executable ( filter_bench
u t i l / f i l t e r _ b e n c h . c c )
target_link_libraries ( filter_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
add_executable ( hash_table_bench
u t i l i t i e s / p e r s i s t e n t _ c a c h e / h a s h _ t a b l e _ b e n c h . c c )
target_link_libraries ( hash_table_bench
$ { R O C K S D B _ L I B } )
$ { R O C K S D B _ L I B } $ { G F L A G S _ L I B } )
endif ( )
if ( WITH_CORE_TOOLS OR WITH_TOOLS )