mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 01:24:08 +00:00
Improve CMake build system documentation
* Mention NMake * Mention Ninja works on Windows * Give example of passing configuration options to ``cmake``
This commit is contained in:
parent
2b9bdf3947
commit
1a914eb9b5
|
@ -126,6 +126,31 @@ to ``cmake``. See the section on "Build Types".
|
||||||
|
|
||||||
Note that Ninja runs in parallel by default. Use the ``-j`` flag to change this.
|
Note that Ninja runs in parallel by default. Use the ``-j`` flag to change this.
|
||||||
|
|
||||||
|
Note that Ninja also runs on Windows. You just need to run ``cmake`` in an
|
||||||
|
environment where the compiler can be found. If you have Visual Studio
|
||||||
|
installed it typically ships with a "Developer Command Prompt Window" that you
|
||||||
|
can use which has the environment variables setup for you.
|
||||||
|
|
||||||
|
## NMake
|
||||||
|
|
||||||
|
NMake is a build system that ships with Visual Studio. You are advised to use
|
||||||
|
Ninja instead which is significantly faster due to supporting concurrent
|
||||||
|
builds. However CMake does support NMake if you wish to use it. Note that
|
||||||
|
NMake is a single configuration generator so you must set ``CMAKE_BUILD_TYPE``
|
||||||
|
to set the build type.
|
||||||
|
|
||||||
|
Basic usage:
|
||||||
|
|
||||||
|
1. Launch the "Developer Command Prompt Windows"
|
||||||
|
2. Change to the root of the Z3 repository
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -G "NMake Makefiles" ../
|
||||||
|
nmake
|
||||||
|
```
|
||||||
|
|
||||||
### Visual Studio
|
### Visual Studio
|
||||||
|
|
||||||
For the Visual Studio generators you need to know which version of Visual Studio you wish
|
For the Visual Studio generators you need to know which version of Visual Studio you wish
|
||||||
|
@ -194,6 +219,12 @@ The following useful options can be passed to CMake whilst configuring.
|
||||||
|
|
||||||
On the command line these can be passed to ``cmake`` using the ``-D`` option. In ``ccmake`` and ``cmake-gui`` these can be set in the user interface.
|
On the command line these can be passed to ``cmake`` using the ``-D`` option. In ``ccmake`` and ``cmake-gui`` these can be set in the user interface.
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
```
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TRACING=FALSE ../
|
||||||
|
```
|
||||||
|
|
||||||
## Developer/packager notes
|
## Developer/packager notes
|
||||||
|
|
||||||
These notes are help developers and packagers of Z3.
|
These notes are help developers and packagers of Z3.
|
||||||
|
|
Loading…
Reference in a new issue