mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
Updated build options for .NET API
This commit is contained in:
parent
f4e3989766
commit
22a77721ef
|
@ -24,6 +24,7 @@ BUILD_X86_DIR=os.path.join('build-dist', 'x86')
|
||||||
VERBOSE=True
|
VERBOSE=True
|
||||||
DIST_DIR='dist'
|
DIST_DIR='dist'
|
||||||
FORCE_MK=False
|
FORCE_MK=False
|
||||||
|
DOTNET_ENABLED=True
|
||||||
JAVA_ENABLED=True
|
JAVA_ENABLED=True
|
||||||
GIT_HASH=False
|
GIT_HASH=False
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@ def display_help():
|
||||||
print(" -s, --silent do not print verbose messages.")
|
print(" -s, --silent do not print verbose messages.")
|
||||||
print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
|
print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
|
||||||
print(" -f, --force force script to regenerate Makefiles.")
|
print(" -f, --force force script to regenerate Makefiles.")
|
||||||
|
print(" --nodotnet do not include .NET bindings in the binary distribution files.")
|
||||||
print(" --nojava do not include Java bindings in the binary distribution files.")
|
print(" --nojava do not include Java bindings in the binary distribution files.")
|
||||||
print(" --githash include git hash in the Zip file.")
|
print(" --githash include git hash in the Zip file.")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
@ -68,6 +70,7 @@ def parse_options():
|
||||||
'silent',
|
'silent',
|
||||||
'force',
|
'force',
|
||||||
'nojava',
|
'nojava',
|
||||||
|
'nodotnet',
|
||||||
'githash'
|
'githash'
|
||||||
])
|
])
|
||||||
for opt, arg in options:
|
for opt, arg in options:
|
||||||
|
@ -81,6 +84,8 @@ def parse_options():
|
||||||
display_help()
|
display_help()
|
||||||
elif opt in ('-f', '--force'):
|
elif opt in ('-f', '--force'):
|
||||||
FORCE_MK = True
|
FORCE_MK = True
|
||||||
|
elif opt == '--nodotnet':
|
||||||
|
DOTNET_ENABLED = False
|
||||||
elif opt == '--nojava':
|
elif opt == '--nojava':
|
||||||
JAVA_ENABLED = False
|
JAVA_ENABLED = False
|
||||||
elif opt == '--githash':
|
elif opt == '--githash':
|
||||||
|
@ -97,6 +102,8 @@ def check_build_dir(path):
|
||||||
def mk_build_dir(path, x64):
|
def mk_build_dir(path, x64):
|
||||||
if not check_build_dir(path) or FORCE_MK:
|
if not check_build_dir(path) or FORCE_MK:
|
||||||
opts = ["python", os.path.join('scripts', 'mk_make.py'), "--parallel=24", "-b", path]
|
opts = ["python", os.path.join('scripts', 'mk_make.py'), "--parallel=24", "-b", path]
|
||||||
|
if DOTNET_ENABLED:
|
||||||
|
opts.append('--dotnet')
|
||||||
if JAVA_ENABLED:
|
if JAVA_ENABLED:
|
||||||
opts.append('--java')
|
opts.append('--java')
|
||||||
if x64:
|
if x64:
|
||||||
|
@ -174,10 +181,8 @@ def mk_dist_dir_core(x64):
|
||||||
build_path = BUILD_X86_DIR
|
build_path = BUILD_X86_DIR
|
||||||
dist_path = os.path.join(DIST_DIR, get_z3_name(x64))
|
dist_path = os.path.join(DIST_DIR, get_z3_name(x64))
|
||||||
mk_dir(dist_path)
|
mk_dir(dist_path)
|
||||||
if JAVA_ENABLED:
|
mk_util.DOTNET_ENABLED = DOTNET_ENABLED
|
||||||
# HACK: Propagate JAVA_ENABLED flag to mk_util
|
mk_util.JAVA_ENABLED = JAVA_ENABLED
|
||||||
# TODO: fix this hack
|
|
||||||
mk_util.JAVA_ENABLED = JAVA_ENABLED
|
|
||||||
mk_win_dist(build_path, dist_path)
|
mk_win_dist(build_path, dist_path)
|
||||||
if is_verbose():
|
if is_verbose():
|
||||||
print("Generated %s distribution folder at '%s'" % (platform, dist_path))
|
print("Generated %s distribution folder at '%s'" % (platform, dist_path))
|
||||||
|
|
Loading…
Reference in a new issue