Skip to content

Update COMPILING with cmake setup instructions #1523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,35 @@ There is an experimental build based on CMake instead of hand-written
makefiles. It should work on a wider variety of systems than the standard
makefile build, and can integrate better with IDEs and static-analysis tools.

1. Run `cmake --version`. If you get a command-not-found error, or the
installed version is lower than 3.2, go and install a new version. Most
Linux distributions have a package for CMake, and Mac users can get it
through Homebrew. Windows users should download it manually from cmake.org.
2. Create a directory to store your build:
```
mkdir build
```
Run this from the *top level* folder of the project. This is different from
the other builds, which require you to `cd src` first.
1. Ensure you have all the build dependencies installed. Build dependencies are
the same as for the makefile build, but with the addition of CMake version
3.2 or higher. The installed CMake version can be queried with `cmake
--version`. To install all build dependencies:
- On Debian-like distributions, do
```
apt-get install cmake g++ gcc flex bison make git libwww-perl patch
```
- On Red Hat/Fedora or derivates, do
```
yum install cmake gcc gcc-c++ flex bison perl-libwww-perl patch devtoolset-6
```
- On macOS, do
```
xcode-select --install
```
You shoud also install [Homebrew](https://brew.sh), after which you can
run `brew install cmake` to install CMake.
- On Windows, install Cygwin, then from the Cygwin setup facility install
`cmake`, `flex`, `bison`, `tar`, `gzip`, `git`, `make`, `wget`, and
`patch`.
- Use of CMake has not been tested on Solaris or FreeBSD. However, it should
be possible to install CMake from the system package manager or the
[official download page](https://cmake.org/download) on those systems.
The dependencies (as listed in the relevant sections above) will also be
required, and should be installed using the suggested methods.
2. Navigate to the *top level* folder of the project. This is different from
the Makefile build, which requires you to navigate to the `src` directory
first.
3. Generate build files with CMake:
```
cmake -H. -Bbuild
Expand Down