-
Notifications
You must be signed in to change notification settings - Fork 53
Source Build for Users
Michael Rawson edited this page May 28, 2024
·
1 revision
Vampire is built with the help of CMake. CMake does not run any build commands directly: instead, it can generate a number of different output formats, such as UNIX Makefiles. If you are completely new to CMake, there is a tutorial for end-users.
A typical build on a UNIX-like system might look like this:
# ensure you are in the Vampire source directory
$ cd vampire
# make a fresh directory for the build files
$ mkdir build && cd build
# configure and generate build files
$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
<snip>
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build
# build Vampire
$ make
<snip>
# You now have a Vampire binary in bin/
$
Vampire can optionally link to a fixed version of the external Z3 library.
To do this, you should do the following before a Vampire build as above. If you have already built Vampire without Z3, make a new build directory.
$ cd vampire
# check out a specific version of Z3
$ git submodule update --init
$ cd z3
# following is a Z3 build - refer to z3/README-CMake.md
$ mkdir z3/build && cd z3/build
# configure single-threaded Z3 release build
$ cmake .. -DZ3_SINGLE_THREADED=1 -DCMAKE_BUILD_TYPE=Release
<snip>
# build Z3
$ make
<snip>
# you should now have some libz3.* files in z3/build
$
# now go and build Vampire as before!
Vampire's build system detects the presence or absence of vampire/z3/build
and configures a Z3 or no-Z3 build accordingly.
Advanced use cases primarily for developers are covered elsewhere.