mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 01:32:17 +00:00
Fix how the list of linker flags `Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS
`
is applied to targets. The ``LINK_FLAGS`` property of a target is a string and not a list and so if ``Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS`` contained more than one flag the linker line would end up being ``-flag1;flag2;flag3;...`` which would not work. Now we use a new function ``z3_append_linker_flag_list_to_target()`` to iterate through the list and update the ``LINK_FLAGS`` property of the specified target correctly.
This commit is contained in:
parent
a2cc6d256a
commit
29901e79e1
5 changed files with 23 additions and 7 deletions
|
@ -140,7 +140,7 @@ endif()
|
|||
# automatically link against the libs in Z3_DEPENDENT_LIBS
|
||||
target_link_libraries(libz3 INTERFACE ${Z3_DEPENDENT_LIBS})
|
||||
|
||||
set_property(TARGET libz3 APPEND PROPERTY LINK_FLAGS ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS})
|
||||
z3_append_linker_flag_list_to_target(libz3 ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS})
|
||||
|
||||
# Declare which header file are the public header files of libz3
|
||||
# these will automatically installed when the libz3 target is installed
|
||||
|
@ -196,9 +196,7 @@ if (MSVC)
|
|||
DEPENDS "${dll_module_exports_file}"
|
||||
)
|
||||
add_dependencies(libz3 libz3_extra_depends)
|
||||
set_property(TARGET libz3 APPEND PROPERTY LINK_FLAGS
|
||||
"/DEF:${dll_module_exports_file}"
|
||||
)
|
||||
z3_append_linker_flag_list_to_target(libz3 "/DEF:${dll_module_exports_file}")
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue