3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

Use cmake properties for symbol visibility and PIC.

This commit is contained in:
Bruce Mitchener 2022-08-02 00:58:02 +07:00 committed by Nikolaj Bjorner
parent 886c3abec1
commit b3612264a9
2 changed files with 6 additions and 22 deletions

View file

@ -206,6 +206,12 @@ macro(z3_add_component component_name)
foreach (flag ${Z3_COMPONENT_CXX_FLAGS})
target_compile_options(${component_name} PRIVATE ${flag})
endforeach()
set_target_properties(${component_name} PROPERTIES
# Position independent code needed in shared libraries
POSITION_INDEPENDENT_CODE ON
# Symbol visibility
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON)
# It's unfortunate that we have to manage dependencies ourselves.
#