Author: Marcus Walther 20.11.2015

============================
BUILD THE SIMULATION RUNTIME
============================
Building the c++ simulation runtime with OpenModelica is slightly different for
Linux/Mac and Windows. The following lines explain how to build the runtime with
it's default configuration. All commands should be executed in the
“superproject”-folder of OpenModelica, which contains the OMCompiler-folder.

  Linux/Mac:
    configure --with-cppruntime --with-cppruntime-args
    make omc

  Windows:
    make -f Makefile.omdev.mingw runtimeCPPinstall

    (if the visual studio compiler should be used):
    make -f Makefile.omdev.mingw runtimeCPPmsvcinstall


==============================================
CONFIGURING THE SIMULATION RUNTIME (Linux/Mac)
==============================================
It is possible to configure the behavior of the simulation
runtime with the autoconf-script of OpenModelica. This can be done
by passing the --with-cppruntime-args=[comma separated list of arguments]
to configure. The following arguments are available at the moment:

  BOOST_STATIC_LINKING
  BOOST_REALPATHS
  BOOST_ROOT
  RUNTIME_PROFILING
  SCOREP
  SCOREP_HOME=[path]
  FMU_SUNDIALS
  PARALLEL_OUTPUT
  USE_LOGGER
  BUILDTYPE
  CPP_03
  USE_KLU

e.g.: configure --with-cppruntime --with-cppruntime-args=BUILDTYPE=Debug,RUNTIME_PROFILING,CPP_03

For further details, see the description below.


============================================
CONFIGURING THE SIMULATION RUNTIME (Windows)
============================================
If you want to change the behaviour of cpp runtime, you can pass
arguments directly to the makefile. Multiple arguments are separated through
spaces as usual. The available arguments differ slightly from the linux ones,
because not all libraries are available on both systems.

  BOOST_STATIC_LINKING="true"
  BOOST_REALPATHS="true"
  RUNTIME_PROFILING="true"
  SCOREP="true"
  SCOREP_HOME=”...”
  FMU_SUNDIALS="true"
  PARALLEL_OUTPUT="true"
  USE_LOGGER="false"
  BUILDTYPE=[Release,Debug]
  USE_KLU=["true","false"]
e.g.: make -f Makefile.omdev.mingw runtimeCPPmsvcinstall BOOST_STATIC_LINKING="true" USE_LOGGER="false"

For further details, see the description below.


==================================
CONFIGURATION ARGUMENT DESCRIPTION
==================================
The following section explains the arguments that can be passed in more detail.

  The boost static libraries can be used for the build, by passing the
  BOOST_STATIC_LINKING argument to make. Take care that all boost- libraries are
  linked statically.

  Sometimes it's necessary to link boost against it's real path libraries.
  This means for example, that instead of linking against “-lboost_filesystem”, the
  makefiles will link against “-lboost1.55_filesystem”. Use the BOOST_REALPATHS
  argument for this purpose.

  If profiling informations for the runtime are required, they can be turned on
  with the RUNTIME_PROFILING command.

  Profiling can additionally be handled by Score-P. This gives the possibility
  to use tracing besides profiling for performance analysis. Maybe it's
  necessary to give the SCOREP_HOME directory to make as well. This is the
  directory containing “include/scorep/SCOREP_User.h”. Turn the Score-P support
  on, by passing the SCOREP argument.

  The FMU export usually creates executables that use the Newton algorithm to
  solve equation systems. The kinsol solver can be used as well, by passing the
  FMU_SUNDIALS argument to configure.

  Simulation results can be written asynchronously with the help of boost
  threads and a consumer producer algorithm (experimental). This feature is
  available after passing PARALLEL_OUTPUT to configure.

  For performance reasons it can be necessary to disable the logger-code completely.
  This can be done by passing the USE_LOGGER argument.

  The build-type of cmake can be directly controlled by passing the BUILDTYPE
  argument. If debug librariers should be created, set this value to "debug".
  If release libraries are required, pass "release" instead.

  The Windows build does not support c++11 at the moment. Therfore a lot of c++11
  features are replaced with boost equivalents. Sometimes it is necessary to check
  this build on Linux-systems as well. Therefore the argument "CPP_03" can be passed,
  to prevent the usage of c++11 features.
