+ mkdir build
+ cd build
+ cmake [options] ..
+ make
+
+Mac OS X Builds
+---------------
+SimGrid compiles like a charm with clang (version 3.0 or higher) on Mac OS X:
+
+ cmake -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++ .
+ make
+
+With the XCode version of clang 4.1, you may get the following error message:
+CMake Error: Parse error in cache file build_dir/CMakeCache.txt. Offending entry: /SDKs/MacOSX10.8.sdk
+
+In that case, edit the CMakeCache.txt file directly, so that the
+CMAKE_OSX_SYSROOT is similar to the following. Don't worry about the
+warning that the "-pthread" argument is not used, if it appears.
+CMAKE_OSX_SYSROOT:PATH=/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
+
+In the El Capitan version of Max OS X, Apple decided that users don't
+need no /usr/include directory anymore. If you are hit by this pure
+madness, just run the following command to restore that classical UNIX
+directory: xcode-select -install
+
+Windows Builds
+--------------
+
+Building SimGrid on Windows may be something of an adventure: We only
+manage to do so ourselves with MinGW-64, ActiveState Perl and msys
+git). Have a look at out configuration scripts in appveyor.yml, but
+don't expect too much from us: we are really not fluent with Windows.
+Actually your help is welcome.
+
+The drawback of MinGW-64 is that the produced DLL are not compatible
+with MS Visual C. clang-cl sounds promising to fix this. If you get
+something working, please tell us.
+
+Build the Java bindings
+-----------------------
+
+Once you have the full JDK installed (on Debian/Ubuntu, grab the
+package default-jdk for that), things should be as simple as:
+
+ cmake -Denable_java=ON .
+ make
+
+After the compilation, the file simgrid.jar is produced in the root
+directory. If you only want to build the jarfile and its dependencies,
+type make simgrid-java_jar. It will save you the time of building
+every C examples and other things that you don't need for Java.
+
+Sometimes, the build system fails to find the JNI headers:
+ Error: jni could not be found.
+
+In this case, you need to first locate them as follows:
+ $ locate jni.h
+ /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h
+ /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h
+
+Then, set the JAVA_INCLUDE_PATH environment variable to the right
+path, and relaunch cmake. If you have several version of jni installed
+(as above), use the right one (check the java version you use with
+javac -version).
+
+ export JAVA_INCLUDE_PATH=/usr/lib/jvm/java-8-openjdk-amd64/include/
+ cmake -Denable_java=ON .
+ make
+
+Note that the filename jni.h was removed from the path.
+
+32 bits Builds on Multi-arch Linux
+----------------------------------
+
+On a multiarch x86_64 Linux, it should be possible to compile a 32 bit version of SimGrid with something like:
+CFLAGS=-m32 \
+CXXFLAGS=-m32 \
+PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig/ \
+cmake . \
+-DCMAKE_SYSTEM_PROCESSOR=i386 \
+-DCMAKE_Fortran_COMPILER=/some/path/to/i686-linux-gnu-gfortran \
+-DGFORTRAN_EXE=/some/path/to/i686-linux-gnu-gfortran \
+-DCMAKE_Fortran_FLAGS=-m32
+If needed, implement i686-linux-gnu-gfortran as a script:
+#!/bin/sh
+exec gfortran -m32 "$@"
+
+Existing Compilation Targets
+----------------------------
+In most cases, compiling and installing SimGrid is enough:
+ make
+ make install # try "sudo make install" if you don't have the permission to write
+
+In addition, several compilation targets are provided in SimGrid. If
+your system is well configured, the full list of targets is available
+for completion when using the Tab key. Note that some of the existing
+targets are not really for public consumption so don't worry if some
+stuff doesn't work for you.
+
+make simgrid Build only the SimGrid library and not any example
+make app-masterworker Build only this example (works for any example)
+make clean Clean the results of a previous compilation
+make install Install the project (doc/ bin/ lib/ include/)
+make uninstall Uninstall the project (doc/ bin/ lib/ include/)
+make dist Build a distribution archive (tgz)
+make distcheck Check the dist (make + make dist + tests on the distribution)
+make documentation Create SimGrid documentation
+
+If you want to see what is really happening, try adding VERBOSE=1 to your compilation requests:
+
+ make VERBOSE=1
+
+Testing your build
+------------------
+
+Once everything is built, you may want to test the result. SimGrid
+comes with an extensive set of regression tests (as described in the
+insider manual). The tests are run with ctest, that comes with CMake.
+We run them every commit and the results are on our Jenkins.
+
+ctest # Launch all tests
+ctest -R msg # Launch only the tests which name match the string "msg"
+ctest -j4 # Launch all tests in parallel, at most 4 at the same time
+ctest --verbose # Display all details on what's going on
+ctest --output-on-failure # Only get verbose for the tests that fail
+ctest -R msg- -j5 --output-on-failure # You changed MSG and want to check that you didn't break anything, huh?
+ # That's fine, I do so all the time myself.