<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-07-13 2:04 GMT+02:00 René J. V.  Bertin <span dir="ltr"><<a href="mailto:rjvbertin@gmail.com" target="_blank">rjvbertin@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Andreas Naumann wrote:<br>
<br>
> cmake instrospects your compiler and asks for system directories.<br>
<br>
</span>Just stumbled across this documentation tidbit:<br></blockquote><div><br></div><div>Thanks you for digging this.</div><div>I totally ignored that "feature".</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>>>>>>><br>
CMAKE_<LANG>_IMPLICIT_LINK_<wbr>DIRECTORIES<br>
------------------------------<wbr>--------<br>
<br>
Implicit linker search path detected for language ``<LANG>``.<br>
<br>
Compilers typically pass directories containing language runtime<br>
libraries and default library search paths when they invoke a linker.<br>
These paths are implicit linker search directories for the compiler's<br>
language.  CMake automatically detects these directories for each<br>
language and reports the results in this variable.<br>
<br>
When a library in one of these directories is given by full path to<br>
:command:`target_link_<wbr>libraries` CMake will generate the ``-l<name>`` form on<br>
link lines to ensure the linker searches its implicit directories for the<br>
library.  Note that some toolchains read implicit directories from an<br>
environment variable such as ``LIBRARY_PATH`` so keep its value consistent<br>
when operating in a given build tree.<br>
<<<<<<<<br>
<br>
Note the<br>
> CMake will generate the ``-l<name>`` form on link lines to ensure the linker<br>
> searches its implicit directories<br>
<br>
What's the point in doing that when a full path is given? Full path means<br>
searching isn't required. Full path (probably) means that the operator wants to<br>
ensure that a specific library is linked. Full path thus means that searching<br>
can even have counterproductive effects</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">I you have a look at file:</div><div class="gmail_extra"><a href="https://github.com/Kitware/CMake/blob/master/Source/cmComputeLinkInformation.cxx">https://github.com/Kitware/CMake/blob/master/Source/cmComputeLinkInformation.cxx</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">you may discovered (as I just did) that not all CMake supported systems kindly accept full path to library for linking...</div><div class="gmail_extra">so may be the implicit system link dir was introduced for them in the first place.</div><div class="gmail_extra">I guess the author/contributor to this part of CMake may certainly explain that better than me.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Looking the code is interesting because apparently what you need is to set  CMP0060 to NEW:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">$ cmake --help-policy CMP0060</div><div class="gmail_extra">CMP0060</div><div class="gmail_extra">-------</div><div class="gmail_extra"><br></div><div class="gmail_extra">Link libraries by full path even in implicit directories.</div><div>....</div><div><br></div><div><div>The OLD behavior for this policy is to ask the linker to search for</div><div>libraries whose full paths are known to be in implicit link directories.</div><div>The NEW behavior for this policy is to link libraries by full path even</div><div>if they are in implicit link directories.</div><div><br></div><div>This policy was introduced in CMake version 3.3.  Unlike most policies,</div><div>CMake version 3.7.2 does *not* warn by default when this policy</div><div>is not set and simply uses OLD behavior.  See documentation of the</div><div>``CMAKE_POLICY_WARNING_CMP0060``</div><div>variable to control the warning.</div></div><div><br></div><div><br></div><div>The thing I don't understand is that you use CMake 3.8.2 so you should get the new behavior.</div><div>However since digikam does a cmake_minimum_required(VERSION 3.0.0) which may</div><div>set the CMP0060 to old.</div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>