|
| 1 | +# Build the C++ runtime |
| 2 | + |
| 3 | +Set `OM_OMC_ENABLE_CPP_RUNTIME=ON` when compiling with CMake. |
| 4 | +Check [README.cmake.md](../../../README.cmake.md) for details. |
| 5 | + |
| 6 | +## Configuration arguments |
| 7 | + |
| 8 | +```cmake |
| 9 | + BOOST_STATIC_LINKING="true" |
| 10 | + BOOST_REALPATHS="true" |
| 11 | + RUNTIME_PROFILING="true" |
| 12 | + SCOREP="true" |
| 13 | + SCOREP_HOME=”...” |
| 14 | + FMU_SUNDIALS="true" |
| 15 | + PARALLEL_OUTPUT="true" |
| 16 | + USE_LOGGER="false" |
| 17 | + BUILDTYPE=[Release,Debug] |
| 18 | + USE_KLU=["true","false"] |
| 19 | +``` |
| 20 | + |
| 21 | +The boost static libraries can be used for the build, by passing the |
| 22 | +`BOOST_STATIC_LINKING` argument to make. Take care that all boost- libraries are |
| 23 | +linked statically. |
| 24 | + |
| 25 | +Sometimes it's necessary to link boost against it's real path libraries. This |
| 26 | +means for example, that instead of linking against “-lboost_filesystem”, the |
| 27 | +makefiles will link against “-lboost1.55_filesystem”. Use the `BOOST_REALPATHS` |
| 28 | +argument for this purpose. |
| 29 | + |
| 30 | +If profiling informations for the runtime are required, they can be turned on |
| 31 | +with the `RUNTIME_PROFILING` command. |
| 32 | + |
| 33 | +Profiling can additionally be handled by Score-P. This gives the possibility to |
| 34 | +use tracing besides profiling for performance analysis. Maybe it's necessary to |
| 35 | +give the `SCOREP_HOME` directory to make as well. This is the directory |
| 36 | +containing `include/scorep/SCOREP_User.h`. Turn the Score-P support on, by |
| 37 | +passing the `SCOREP` argument. |
| 38 | + |
| 39 | +The FMU export usually creates executables that use the Newton algorithm to |
| 40 | +solve equation systems. The KINSOL solver can be used as well, by passing the |
| 41 | +`FMU_SUNDIALS` argument to configure. |
| 42 | + |
| 43 | +Simulation results can be written asynchronously with the help of boost |
| 44 | +threads and a consumer producer algorithm (experimental). This feature is |
| 45 | +available after passing `PARALLEL_OUTPUT` to configure. |
| 46 | + |
| 47 | +For performance reasons it can be necessary to disable the logger-code completely. |
| 48 | +This can be done by passing the `USE_LOGGER` argument. |
| 49 | + |
| 50 | +The build-type of cmake can be directly controlled by passing the `BUILDTYPE` |
| 51 | +argument. If debug librariers should be created, set this value to `debug`. |
| 52 | +If release libraries are required, pass `release` instead. |
| 53 | + |
| 54 | +The Windows build does not support C++11 at the moment. Therfore a lot of C++11 |
| 55 | +features are replaced with boost equivalents. Sometimes it is necessary to check |
| 56 | +this build on Linux-systems as well. Therefore the argument `CPP_03` can be |
| 57 | +passed, to prevent the usage of C++11 features. |
| 58 | + |
| 59 | +Author: Marcus Walther 20.11.2015 |
0 commit comments