mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 14:13:23 +00:00
Refactor `mk_z3consts_dotnet()
code into
mk_z3consts_dotnet_internal()
`
and move that into ``mk_genfile_common.py``. Then adapt ``mk_util.py`` and ``mk_consts_files.py`` to call into the code at its new location. The purpose of this change is to have Python code common to the Python and CMake build systems separate from Python code that is only used for the Python build system.
This commit is contained in:
parent
0870b4a5a0
commit
d3f87e44a2
3 changed files with 106 additions and 83 deletions
|
@ -16,6 +16,7 @@ def main(args):
|
|||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("api_files", nargs="+")
|
||||
parser.add_argument("--z3py-output-dir", dest="z3py_output_dir", default=None)
|
||||
parser.add_argument("--dotnet-output-dir", dest="dotnet_output_dir", default=None)
|
||||
pargs = parser.parse_args(args)
|
||||
|
||||
if not mk_genfile_common.check_files_exist(pargs.api_files):
|
||||
|
@ -31,6 +32,15 @@ def main(args):
|
|||
logging.info('Generated "{}"'.format(output))
|
||||
count += 1
|
||||
|
||||
if pargs.dotnet_output_dir:
|
||||
if not mk_genfile_common.check_dir_exists(pargs.dotnet_output_dir):
|
||||
return 1
|
||||
output = mk_genfile_common.mk_z3consts_dotnet_internal(
|
||||
pargs.api_files,
|
||||
pargs.dotnet_output_dir)
|
||||
logging.info('Generated "{}"'.format(output))
|
||||
count += 1
|
||||
|
||||
if count == 0:
|
||||
logging.info('No files generated. You need to specific an output directory'
|
||||
' for the relevant langauge bindings')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue