* Update doc for `mk_context`.
* Migrating to cmake.
* Migrating to cmake. It builds both internal or external libz3.
* Start to work on platform-specific problem.
* Messy notes.
* debug.
* Cleanup a bit.
* Fixing shared lib extension.
* Minor.
* Resume working on this PR.
* Remove including `AddOCaml`.
* Keep `z3.ml` and `z3.mli` in the src but specify the generated file in the bin.
* Keep `ml_example.ml` in the src.
* Try github action for ocaml.
* Add workflow using matrix.
* Fix mac linking once more.
* Bypass @rpath in building sanity check.
* sat_literal: make constants constexpr
* dlist: rename elem -> list
* tbv: use get_bit
* additional pdd and rational tests
* egraph: callback setters take functions by value
This allows to set callbacks without defining a separate variable for
the callback lambda.
(previous usage does one copy of the function, exactly as before)
* cmake: enable compiler error when non-void function does not return value
`FindPythonInterp` has been deprecated for a long time and is more
verbal about that deprecation now.
The build system no longer uses `PYTHON_EXECUTABLE` but instead uses
`Python3_EXECUTABLE`.
* CMake: simplify FindGMP.cmake
Remove printing of all the different variables, and let FPHSA output the library
name. Add an imported target, which bundles the library and the include
directories for easier usage.
* fix build: vector::c_ptr() now is vector::data()
* CMake: use Threads::Threads imported module
Otherwise the setting of THREADS_PREFER_PTHREAD_FLAG has no effect.
* CMake: remove needless policy setting
The minimum required version is CMake 3.4, where these policies are already set
to new because they were introduced earlier.
* CMake: remove needless variable expansion
This removes an incomplete check in cmake git-submodule detection
logic, directly using filepath probing instead. As a direct usecase,
it fixes submodule building for https://github.com/prove-rs/z3.rs.
The code should refrain from using global parameters such as CMAKE_SOURCE_DIR/CMAKE_BINARY_DIR, especially here which is handling the case of Z3 being a submodule. Instead, use project specific variables like Z3_SOURCE_DIR so that people can incorporate z3 build as part of their build-system.
reported by @nbraud reported in #1227.
Previously the CMake build system assumed that the `.git` file must
be a directory. This is not the case when the working directory
is a "git worktree". In this case the `.git` file is just a plain
file that points to a directory within the true `.git` directory.
This commit essentially implements the logic to traverse this extra
level of indirection and removes some assumptions that the `.git`
file is a directory.
Now that all include paths are relative to the `src/` trees (
one in source tree and one in the build tree) we can simplify
what the CMake build does significantly.
While I'm here I also removed some dead code that wasn't doing
anything useful.
to allow a new mode `SERIOUS_ONLY`.
Modes:
`ON` - All warnings are treated as errors (same as before)
`OFF` - Warnings are not treated as errors (same as before)
`SERIOUS_ONLY` - A subset of "serious" warnings are treated as errors.
Upgrade code is included to upgrade old CMake cache's to use the new
type of `WARNINGS_AS_ERRORS`. We should remove it eventually. The
user's previous setting is preserved when doing this.
Very few warnings are treated as errors for now. Developers can
add more later as they see fit.