Updating README for CMake.

This commit is contained in:
Stefano Sanfilippo 2014-12-14 14:24:48 +01:00
parent 715b0fe840
commit fabb600d19

View File

@ -11,21 +11,30 @@ Italian, I'm afraid you won't understand. I'm really sorry for you :)
Compilation Compilation
=========== ===========
You will need `bison` version >= 3.0, `flex` >= 2.5 and any C++11 compiler. You will need `bison` version >= 3.0 (Bison 2.5 requires manual intervention),
A makefile is provided and will compile the `mcc` executable. Compiling the `flex` >= 2.5 and any C++11 compiler. The build scripts are generated using
executable is a matter of: CMake. A typical Makefile-based build workflow would be:
mkdir build/
cd build/
cmake ..
make make
A patch is provided for compatibility with Bison 2.5. If you can't really During the Makefile generation, the build script will test the compiler for all
upgrade to Bison 3.0, and I strongly recommend that, you can always compile the required features.
with:
make bison2 If your tools are installed in non-standard locations
(e.g. Bison Brew on Mac OS X), you can alter the search path with:
However, note that this is not supported and might be removed in a future release. PATH=/path/to/bison cmake ..
There are some other targets, which are of interest only for developers. If you can't really upgrade to Bison 3.0, a patch for Bison 2.5
is provided in `cmake/bison2.patch`. You will have to manually apply it with:
patch -p 1 < cmake/bison2.patch
However note that compilation with Bison 2.5 is not supported and the patch might be
removed in the future.
Usage Usage
===== =====