Open arbipher opened 3 months ago
Thank you so much for your careful examination. This is one reason I would like to make this immature draft PR. I am learning how z3 is installed on some platforms so my change won't break them. Also, I am still thinking how the ocaml-binding should be installed.
I will check your changes one by one later.
It's my WIP working on migrating the building of OCaml binding to CMake.
I think the majority of the work is done. I started by mimicking the other bindings and some llvm cmake for ocaml, but then I just manually wrote enough custom commands and dependencies. The actual building commands should have the same result as the previously generated python scripts, though I think I simplified some unnecessary dependencies and compiler flags.
tldr;
It should just work. I also build and run the
ml_examples.ml
for both bytecode and native code in the cmake to make sure it works. I observe all z3 bindings are using shared library so I wonder maybe I don't even need to make a static version for the ocaml-binding.I also add one argument
-DZ3_BUILD_OCAML_EXTERNAL_LIBZ3=/path/to/libz3.so
to support building ocaml building with an external z3 library that is often installed by some other distro package managers.Now the remaining work is :
p.s. for ocaml users, I also have a post for discussion.