mirror of
https://github.com/Z3Prover/z3
synced 2025-10-19 22:00:31 +00:00
Merge branch 'Z3Prover:master' into parallel-solving
This commit is contained in:
commit
8866cf5099
11 changed files with 85 additions and 26 deletions
|
@ -1,5 +1,32 @@
|
|||
find_package(JlCxx REQUIRED)
|
||||
|
||||
# Check for Windows MSVC + MinGW library compatibility issues
|
||||
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Get the JlCxx library path to check its format
|
||||
get_target_property(JLCXX_LIB_PATH JlCxx::cxxwrap_julia IMPORTED_LOCATION)
|
||||
if(NOT JLCXX_LIB_PATH)
|
||||
get_target_property(JLCXX_LIB_PATH JlCxx::cxxwrap_julia IMPORTED_LOCATION_RELEASE)
|
||||
endif()
|
||||
if(NOT JLCXX_LIB_PATH)
|
||||
get_target_property(JLCXX_LIB_PATH JlCxx::cxxwrap_julia IMPORTED_IMPLIB)
|
||||
endif()
|
||||
if(NOT JLCXX_LIB_PATH)
|
||||
get_target_property(JLCXX_LIB_PATH JlCxx::cxxwrap_julia IMPORTED_IMPLIB_RELEASE)
|
||||
endif()
|
||||
|
||||
if(JLCXX_LIB_PATH AND JLCXX_LIB_PATH MATCHES "\\.dll\\.a$")
|
||||
message(FATAL_ERROR
|
||||
"Julia bindings build error: Incompatible CxxWrap library format detected.\n"
|
||||
"The found libcxxwrap_julia library (${JLCXX_LIB_PATH}) is a MinGW import library (.dll.a), "
|
||||
"but Z3 is being built with MSVC which requires .lib format.\n\n"
|
||||
"Solutions:\n"
|
||||
"1. Use MinGW/GCC instead of MSVC to build Z3\n"
|
||||
"2. Install a MSVC-compatible version of CxxWrap\n"
|
||||
"3. Disable Julia bindings with -DZ3_BUILD_JULIA_BINDINGS=OFF\n\n"
|
||||
"For more information, see: https://github.com/JuliaInterop/CxxWrap.jl#compiling-the-c-code")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(z3jl SHARED z3jl.cpp)
|
||||
target_link_libraries(z3jl PRIVATE JlCxx::cxxwrap_julia libz3)
|
||||
target_include_directories(z3jl PRIVATE
|
||||
|
|
|
@ -113,14 +113,21 @@ def _clean_native_build():
|
|||
|
||||
def _z3_version():
|
||||
post = os.getenv('Z3_VERSION_SUFFIX', '')
|
||||
print("z3_version", "release dir", RELEASE_DIR)
|
||||
if RELEASE_DIR is None:
|
||||
fn = os.path.join(SRC_DIR_REPO, 'VERSION.txt')
|
||||
if os.path.exists(fn):
|
||||
with open(fn) as f:
|
||||
for line in f:
|
||||
n = re.match(r"(.*)\.(.*)\.(.*)\.(.*)", line)
|
||||
if not n is None:
|
||||
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4) + post
|
||||
dirs = [SRC_DIR, ROOT_DIR, SRC_DIR_REPO, SRC_DIR_LOCAL, os.path.join(ROOT_DIR, '..', '..')]
|
||||
for d in dirs:
|
||||
if os.path.exists(d):
|
||||
print(d, ": ", os.listdir(d))
|
||||
fns = [os.path.join(d, 'scripts', 'VERSION.txt') for d in dirs]
|
||||
for fn in fns:
|
||||
print("loading version file", fn, "exists", os.path.exists(fn))
|
||||
if os.path.exists(fn):
|
||||
with open(fn) as f:
|
||||
for line in f:
|
||||
n = re.match(r"(.*)\.(.*)\.(.*)\.(.*)", line)
|
||||
if not n is None:
|
||||
return n.group(1) + '.' + n.group(2) + '.' + n.group(3) + '.' + n.group(4) + post
|
||||
return "?.?.?.?"
|
||||
else:
|
||||
version = RELEASE_METADATA[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue