Commit 3957a9c8 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5485 clean out more icc stuff, don't use OBJECT libs


git-svn-id: file:///svn/toku/tokudb@48131 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3cde1f1b
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
project(TokuDB)
......
......@@ -79,33 +79,20 @@ set(FT_SOURCES
)
add_library(ft SHARED ${FT_SOURCES})
add_library(ft_objects OBJECT ${FT_SOURCES})
add_library(ft_static STATIC ${FT_SOURCES})
## 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)
add_library(ft_static STATIC $<TARGET_OBJECTS:ft_objects>)
set_target_properties(ft_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
maybe_add_gcov_to_libraries(ft ft_static)
## depend on other generated targets
add_dependencies(ft install_tdb_h generate_log_code build_lzma)
add_dependencies(ft_objects install_tdb_h generate_log_code build_lzma)
add_dependencies(ft_static install_tdb_h generate_log_code build_lzma)
## link with lzma (which should be static) and link dependers with zlib
target_link_libraries(ft LINK_PRIVATE lzma ${LIBTOKUPORTABILITY})
target_link_libraries(ft LINK_PUBLIC z)
target_link_libraries(ft_static LINK_PRIVATE lzma)
if (CMAKE_C_COMPILER_ID STREQUAL Intel)
target_link_libraries(ft LINK_PRIVATE -nodefaultlibs)
endif ()
## conditionally use cilk
if (USE_CILK)
set_property(TARGET ft APPEND PROPERTY COMPILE_DEFINITIONS HAVE_CILK=1)
set_property(TARGET ft_static APPEND PROPERTY COMPILE_DEFINITIONS HAVE_CILK=1)
target_link_libraries(ft cilkrts)
target_link_libraries(ft_static cilkrts)
endif (USE_CILK)
## build the bins in this directory
set(bins
ftdump
......
......@@ -16,14 +16,13 @@ add_dependencies(lock_tree_tlog install_tdb_h)
## make the real library, it's going to go into libtokudb.so so it needs
## to be PIC
add_library(lock_tree_objects OBJECT ${lock_tree_srcs})
set_target_properties(lock_tree_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_space_separated_property(TARGET lock_tree_objects COMPILE_FLAGS "-fvisibility=hidden")
set_property(TARGET lock_tree_objects APPEND PROPERTY
add_library(lock_tree_static STATIC ${lock_tree_srcs})
set_target_properties(lock_tree_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_space_separated_property(TARGET lock_tree_static COMPILE_FLAGS "-fvisibility=hidden")
set_property(TARGET lock_tree_static APPEND PROPERTY
COMPILE_DEFINITIONS TOKU_RT_NOOVERLAPS)
add_dependencies(lock_tree_objects install_tdb_h)
add_dependencies(lock_tree_static install_tdb_h)
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)
......@@ -12,12 +12,11 @@ add_dependencies(range_tree_tlog install_tdb_h)
## make the real library, it's going to go into libtokudb.so so it needs
## to be PIC
add_library(range_tree_objects OBJECT log_nooverlap)
set_target_properties(range_tree_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_space_separated_property(TARGET range_tree_objects COMPILE_FLAGS "-fvisibility=hidden")
add_dependencies(range_tree_objects install_tdb_h)
add_library(range_tree_static STATIC log_nooverlap)
set_target_properties(range_tree_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_space_separated_property(TARGET range_tree_static COMPILE_FLAGS "-fvisibility=hidden")
add_dependencies(range_tree_static install_tdb_h)
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)
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