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

(cmake): fix visibility on shell z3 binary

Commit #b361226 changed symbol visibility from a global to a local option.
This creates inconsistency for shell that is compiled as an executable rather
than as z3 component.

This commit adds same local options to shell target in cmake.

Prior to the fix, clang on OSX complains with lots of warnings about symbol visibility
being different in different translation units that are linked together
This commit is contained in:
Arie Gurfinkel 2022-08-04 14:26:19 -04:00 committed by Nikolaj Bjorner
parent 78a0f57398
commit a9b7348b4b

View file

@ -34,6 +34,14 @@ add_executable(shell
# we don't want (I think).
${shell_object_files}
)
set_target_properties(shell PROPERTIES
# Position independent code needed in shared libraries
POSITION_INDEPENDENT_CODE ON
# Symbol visibility
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON)
z3_add_install_tactic_rule(${shell_deps})
z3_add_memory_initializer_rule(${shell_deps})
z3_add_gparams_register_modules_rule(${shell_deps})