Updated Compiling Mapnik Faster (markdown)

springmeyer 2012-06-20 05:29:00 -07:00
parent 1cf59d5226
commit 92179ed314

@ -1,16 +1,8 @@
<!-- Name: FasterCompiling -->
<!-- Version: 11 -->
<!-- Last-Modified: 2011/08/11 07:29:20 -->
<!-- Author: springmeyer -->
# Compiling Mapnik Faster # Compiling Mapnik Faster
![source:xkcd.org](http://imgs.xkcd.com/comics/compiling.png) ![source:xkcd.org](http://imgs.xkcd.com/comics/compiling.png)
When you are tired of sword fighting, its time to actually figure out how to compile Mapnik faster. When you are tired of sword fighting, its time to actually figure out how to compile Mapnik faster.
The use of SCons, templates, and particularly boost::spirit2 grammars, means that for a fairly lightweight library like Mapnik things take a long time to compile. The use of SCons, templates, and particularly boost::spirit2 grammars, means that for a fairly lightweight library like Mapnik things take a long time to compile.
Mapnik trunk has increased usage of boost::spirit2 and default compile times have gone from around 7-10 minutes to 15-20 (on dual core machine, 4GB mem) using g++ 4.2 Mapnik trunk has increased usage of boost::spirit2 and default compile times have gone from around 7-10 minutes to 15-20 (on dual core machine, 4GB mem) using g++ 4.2
@ -53,7 +45,7 @@ then compile Mapnik like:
Be aware that clang provides more warnings that gcc, and this can clog your terminal sometimes when the boost guys get careless. To silence most of the clang warnings that come from boost headers you can do: Be aware that clang provides more warnings that gcc, and this can clog your terminal sometimes when the boost guys get careless. To silence most of the clang warnings that come from boost headers you can do:
```sh ```sh
$ python scons/scons.py install WARNING_CXXFLAGS="-Wno-unused-function -Wno-uninitialized -Wno-array-bounds -Wno-parentheses -Wno-char-subscripts" $ python scons/scons.py install WARNING_CXXFLAGS="-Wno-unused-function -Wno-uninitialized -Wno-array-bounds -Wno-parentheses -Wno-char-subscripts -Wno-internal-linkage-in-inline"
``` ```
## Use Precompiled Headers ## Use Precompiled Headers