Commit 78ad3e15 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4871] fix linking with gcc, I think

git-svn-id: file:///svn/toku/tokudb@44593 c7de825b-a66e-492c-adef-691d508d4ae1
parent e13da393
...@@ -155,9 +155,9 @@ function(add_common_options_to_binary_targets) ...@@ -155,9 +155,9 @@ function(add_common_options_to_binary_targets)
foreach(tgt ${ARGN}) foreach(tgt ${ARGN})
add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE") add_space_separated_property(TARGET ${tgt} COMPILE_FLAGS "-fvisibility=hidden -fPIE")
if (CMAKE_C_COMPILER_ID STREQUAL Clang) if (CMAKE_C_COMPILER_ID STREQUAL Clang)
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-Wl,-pie") add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -Wl,-pie")
else () else ()
add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-pie") add_space_separated_property(TARGET ${tgt} LINK_FLAGS "-fPIE -pie")
endif () endif ()
endforeach(tgt) endforeach(tgt)
endfunction(add_common_options_to_binary_targets) endfunction(add_common_options_to_binary_targets)
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