mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
Fix racing MSVC CMake build. The `libz3
` target must have a different
OUTPUT_NAME than the ``shell`` target to avoid conflicting file names.
This commit is contained in:
parent
246a105006
commit
ce54f6d957
|
@ -90,7 +90,6 @@ endif()
|
||||||
add_library(libz3 ${lib_type} ${object_files})
|
add_library(libz3 ${lib_type} ${object_files})
|
||||||
# FIXME: Set "VERSION" and "SOVERSION" properly
|
# FIXME: Set "VERSION" and "SOVERSION" properly
|
||||||
set_target_properties(libz3 PROPERTIES
|
set_target_properties(libz3 PROPERTIES
|
||||||
OUTPUT_NAME z3
|
|
||||||
# FIXME: Should we be using ${Z3_VERSION} here?
|
# FIXME: Should we be using ${Z3_VERSION} here?
|
||||||
# VERSION: Sets up symlinks, does it do anything else?
|
# VERSION: Sets up symlinks, does it do anything else?
|
||||||
VERSION ${Z3_VERSION}
|
VERSION ${Z3_VERSION}
|
||||||
|
@ -98,6 +97,16 @@ set_target_properties(libz3 PROPERTIES
|
||||||
# and should be incremented everytime the API changes
|
# and should be incremented everytime the API changes
|
||||||
SOVERSION ${Z3_VERSION})
|
SOVERSION ${Z3_VERSION})
|
||||||
|
|
||||||
|
if (NOT MSVC)
|
||||||
|
# On UNIX like platforms if we don't change the OUTPUT_NAME
|
||||||
|
# the library gets a name like ``liblibz3.so`` so we change it
|
||||||
|
# here. We don't do a rename with MSVC because we get file naming
|
||||||
|
# conflicts (the z3 executable also has this OUTPUT_NAME) with
|
||||||
|
# ``.ilk``, ``.pdb``, ``.lib`` and ``.exp`` files sharing the same
|
||||||
|
# prefix.
|
||||||
|
set_target_properties(libz3 PROPERTIES OUTPUT_NAME z3)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Using INTERFACE means that targets that try link against libz3 will
|
# Using INTERFACE means that targets that try link against libz3 will
|
||||||
# automatically link against the libs in Z3_DEPENDENT_LIBS
|
# automatically link against the libs in Z3_DEPENDENT_LIBS
|
||||||
target_link_libraries(libz3 INTERFACE ${Z3_DEPENDENT_LIBS})
|
target_link_libraries(libz3 INTERFACE ${Z3_DEPENDENT_LIBS})
|
||||||
|
|
Loading…
Reference in a new issue