Commit 737d1a64 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5368 #4781 fix integration of gcov and OBJECT libs

git-svn-id: file:///svn/toku/tokudb@48036 c7de825b-a66e-492c-adef-691d508d4ae1
parent 950d5167
...@@ -197,7 +197,7 @@ function(maybe_add_gcov_to_libraries) ...@@ -197,7 +197,7 @@ function(maybe_add_gcov_to_libraries)
foreach(lib ${ARGN}) foreach(lib ${ARGN})
add_space_separated_property(TARGET ${lib} COMPILE_FLAGS --coverage) add_space_separated_property(TARGET ${lib} COMPILE_FLAGS --coverage)
add_space_separated_property(TARGET ${lib} LINK_FLAGS --coverage) add_space_separated_property(TARGET ${lib} LINK_FLAGS --coverage)
target_link_libraries(${lib} gcov) target_link_libraries(${lib} LINK_INTERFACE_LIBRARIES_DEBUG gcov)
endforeach(lib) endforeach(lib)
endif (USE_GCOV) endif (USE_GCOV)
endfunction(maybe_add_gcov_to_libraries) endfunction(maybe_add_gcov_to_libraries)
......
...@@ -82,8 +82,8 @@ add_library(ft SHARED ${FT_SOURCES}) ...@@ -82,8 +82,8 @@ add_library(ft SHARED ${FT_SOURCES})
add_library(ft_objects OBJECT ${FT_SOURCES}) add_library(ft_objects OBJECT ${FT_SOURCES})
## we're going to link this into libtokudb.so so it needs to have PIC ## we're going to link this into libtokudb.so so it needs to have PIC
set_target_properties(ft_objects PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(ft_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
maybe_add_gcov_to_libraries(ft ft_objects)
add_library(ft_static STATIC $<TARGET_OBJECTS:ft_objects>) add_library(ft_static STATIC $<TARGET_OBJECTS:ft_objects>)
maybe_add_gcov_to_libraries(ft ft_static)
## depend on other generated targets ## depend on other generated targets
add_dependencies(ft install_tdb_h generate_log_code build_lzma) add_dependencies(ft install_tdb_h generate_log_code build_lzma)
......
...@@ -23,7 +23,7 @@ set_property(TARGET lock_tree_objects APPEND PROPERTY ...@@ -23,7 +23,7 @@ set_property(TARGET lock_tree_objects APPEND PROPERTY
COMPILE_DEFINITIONS TOKU_RT_NOOVERLAPS) COMPILE_DEFINITIONS TOKU_RT_NOOVERLAPS)
add_dependencies(lock_tree_objects install_tdb_h) add_dependencies(lock_tree_objects install_tdb_h)
maybe_add_gcov_to_libraries(lock_tree_lin lock_tree_tlog lock_tree_objects)
add_library(lock_tree_static STATIC $<TARGET_OBJECTS:lock_tree_objects>) add_library(lock_tree_static STATIC $<TARGET_OBJECTS:lock_tree_objects>)
maybe_add_gcov_to_libraries(lock_tree_lin lock_tree_tlog lock_tree_static)
add_subdirectory(tests) add_subdirectory(tests)
...@@ -17,8 +17,7 @@ set_target_properties(range_tree_objects PROPERTIES POSITION_INDEPENDENT_CODE ON ...@@ -17,8 +17,7 @@ set_target_properties(range_tree_objects PROPERTIES POSITION_INDEPENDENT_CODE ON
add_space_separated_property(TARGET range_tree_objects COMPILE_FLAGS "-fvisibility=hidden") add_space_separated_property(TARGET range_tree_objects COMPILE_FLAGS "-fvisibility=hidden")
add_dependencies(range_tree_objects install_tdb_h) add_dependencies(range_tree_objects install_tdb_h)
maybe_add_gcov_to_libraries(range_tree_lin range_tree_tlog range_tree_objects)
add_library(range_tree_static STATIC $<TARGET_OBJECTS:range_tree_objects>) add_library(range_tree_static STATIC $<TARGET_OBJECTS:range_tree_objects>)
maybe_add_gcov_to_libraries(range_tree_lin range_tree_tlog range_tree_static)
add_subdirectory(tests) add_subdirectory(tests)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment