TraceR icon indicating copy to clipboard operation
TraceR copied to clipboard

CMake build system

Open nightlark opened this issue 6 years ago • 0 comments

This adds support for building the main TraceR executable with CMake. A first pass has been made at supporting a sphinx doc build target and running the tests using ctest. Building examples has the start of CMake files, but the compiler wrapper for scorep (used for the stencil4d-otf example) has issues during the linking stage, and I think will require upstream support from scorep developers to fix.

There are several other open pull requests (the regression testing one) that should be merged first. There are likely to be some merge conflicts with regression test files that will need resolving once that happens.

Example usage (assuming dependencies are installed to the home directory):

mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH="$HOME/codes-install;$HOME/scorep-install;$HOME/ROSS-install/lib" ..
make -j

Paths to the install prefixes for dependencies can be given using the ;-separated list as shown above (e.g. for BigSim support, add the install prefix for BigSim/Charm). As an alternative, there are CMake variables that can be set when configuring the project with cmake, such as:

PKG_CONFIG_PATH=$HOME/codes-install/lib/pkgconfig cmake -DROSS_DIR=$HOME/ROSS-install/lib

If dependencies are in standard system install locations or set in the right environment variables (e.g. PATH, LD_LIBRARY_PATH) they should be found automatically without listing the paths.

nightlark avatar Oct 02 '19 20:10 nightlark