Commit 6b7eda88 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4871] do not use COMPILE_FLAGS_RELEASE until http://www.cmake.org/Bug/view.php?id=6493 is fixed.

git-svn-id: file:///svn/toku/tokudb@44550 c7de825b-a66e-492c-adef-691d508d4ae1
parent e26f2532
......@@ -153,11 +153,11 @@ endfunction(maybe_add_gcov_to_libraries)
## good for binaries
function(add_common_options_to_binary_targets)
foreach(tgt ${ARGN})
add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS_RELEASE "-fvisibility=hidden -fPIE")
add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
if (CMAKE_C_COMPILER_ID STREQUAL Clang)
add_space_separated_property(TARGET ${tgt} LINK_FLAGS_RELEASE "-Wl,-pie")
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-Wl,-pie")
else ()
add_space_separated_property(TARGET ${tgt} LINK_FLAGS_RELEASE "-pie")
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-pie")
endif ()
endforeach(tgt)
endfunction(add_common_options_to_binary_targets)
\ No newline at end of file
endfunction(add_common_options_to_binary_targets)
......@@ -8,7 +8,6 @@ set_source_files_properties(
PROPERTIES GENERATED TRUE)
add_executable(logformat logformat.c)
add_common_options_to_binary_targets(logformat)
target_link_libraries(logformat ${LIBTOKUPORTABILITY})
add_custom_command(
......
......@@ -38,8 +38,8 @@ endif ()
## add a version script and set -fvisibility=hidden for the shared library
configure_file(export.map . COPYONLY)
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_space_separated_property(TARGET ${LIBTOKUDB} COMPILE_FLAGS_RELEASE -fvisibility=hidden)
add_space_separated_property(TARGET ${LIBTOKUDB} LINK_FLAGS_RELEASE "-Wl,--version-script=export.map")
add_space_separated_property(TARGET ${LIBTOKUDB} COMPILE_FLAGS -fvisibility=hidden)
add_space_separated_property(TARGET ${LIBTOKUDB} LINK_FLAGS "-Wl,--version-script=export.map")
endif ()
## add gcov and define _GNU_SOURCE
......
......@@ -15,8 +15,7 @@ add_dependencies(lock_tree_tlog_static 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_static STATIC ${lock_tree_srcs})
add_space_separated_property(TARGET lock_tree_static COMPILE_FLAGS -fPIC)
add_space_separated_property(TARGET lock_tree_static COMPILE_FLAGS_RELEASE -fvisibility=hidden)
add_space_separated_property(TARGET lock_tree_static COMPILE_FLAGS "-fvisibility=hidden -fPIC")
set_property(TARGET lock_tree_static APPEND PROPERTY
COMPILE_DEFINITIONS TOKU_RT_NOOVERLAPS)
add_dependencies(lock_tree_static install_tdb_h)
......
......@@ -9,7 +9,7 @@ if(BUILD_TESTING)
add_executable(lt_${base}.${impl} ${src})
set_property(TARGET lt_${base}.${impl} APPEND PROPERTY
COMPILE_DEFINITIONS "TESTDIR=\"dir.${base}.c.${impl}\"")
add_space_separated_property(TARGET lt_${base}.${impl} COMPILE_FLAGS_RELEASE -fvisibility=hidden)
add_space_separated_property(TARGET lt_${base}.${impl} COMPILE_FLAGS -fvisibility=hidden)
target_link_libraries(lt_${base}.${impl}
lock_tree_${impl}_static
range_tree_${impl}_static
......@@ -42,4 +42,4 @@ if(BUILD_TESTING)
endforeach(i)
endforeach(type)
endforeach(impl)
endif(BUILD_TESTING)
\ No newline at end of file
endif(BUILD_TESTING)
......@@ -11,8 +11,7 @@ add_dependencies(range_tree_tlog_static 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_static STATIC log_nooverlap.c)
add_space_separated_property(TARGET range_tree_static COMPILE_FLAGS -fPIC)
add_space_separated_property(TARGET range_tree_static COMPILE_FLAGS_RELEASE -fvisibility=hidden)
add_space_separated_property(TARGET range_tree_static COMPILE_FLAGS "-fvisibility=hidden -fPIC")
add_dependencies(range_tree_static install_tdb_h)
maybe_add_gcov_to_libraries(range_tree_lin_static range_tree_tlog_static range_tree_static)
......
......@@ -9,7 +9,7 @@ if(BUILD_TESTING)
add_executable(rt_${base}.${impl} ${src})
set_property(TARGET rt_${base}.${impl} APPEND PROPERTY
COMPILE_DEFINITIONS "TESTDIR=\"dir.${base}.c.${impl}\"")
add_space_separated_property(TARGET rt_${base}.${impl} COMPILE_FLAGS_RELEASE -fvisibility=hidden)
add_space_separated_property(TARGET rt_${base}.${impl} COMPILE_FLAGS -fvisibility=hidden)
target_link_libraries(rt_${base}.${impl}
range_tree_${impl}_static
ft
......@@ -23,4 +23,4 @@ if(BUILD_TESTING)
set_property(TARGET rt_${base}.tlog APPEND PROPERTY
COMPILE_DEFINITIONS TOKU_RT_NOOVERLAPS)
endforeach(src)
endif(BUILD_TESTING)
\ No newline at end of file
endif(BUILD_TESTING)
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