Commit 77d689df authored by Peter Wu's avatar Peter Wu

deterministic_build_systems: add some CMake and RPATH notes

parent edca6320
......@@ -46,6 +46,24 @@ What follows are some advices on common issues that can affect source
code or build systems that make multiple builds from the exact same
source different.
CMake notes
The default configuration of CMake makes the build directory part of the
build environment. Here are some known issues and recommendations:
* CMake sets a `RPATH` for binaries that link to a library in the build
directory, containing the build directory. Even if this is stripped
Possible workarounds:
ensure a deterministic RPATH. Disadvantage: programs from the build
directory cannot be run without setting `LD_LIBRARY_PATH`.
* Set
to enable the use of relative directories in RPATH (requires CMake
3.14). This is an appropriate option for both upstream projects
and downstream distributions.
Markdown is supported
0% or
Finish editing this message first!
Please register or to comment