[cmake-developers] Wrongly assuming lib/ is IsImplicitDirectory for runtime-paths
Brad King
brad.king at kitware.com
Mon May 15 09:05:53 EDT 2017
On 05/15/2017 03:28 AM, Patrick Boettcher wrote:
> To this list somewhere the lib/-path located next to the
> compiler-bin/-path has been added.
[snip]
> What can I do? Is this a bug in cmake or in my setup?
> Why is this path considered implicit?
CMake tries to detect the implicit link directories used by the
compiler front-end when driving the linker. See results in any
build tree:
```
$ grep IMPLICIT CMakeFiles/*/CMake*Compiler.cmake
```
The `Modules/CMakeParseImplicitLinkInfo.cmake` file contains the
code that does this. It is called while detecting the compiler.
The assumption is that running `c++ foo.cpp && ./a.out` will work
with no special runtime paths explicitly added. The toolchain
should be configured to add its own implicit link directories to
the runtime path of binaries it links, or the environment should
otherwise be configured such that the dynamic loader looks there.
-Brad
More information about the cmake-developers
mailing list