On 09/17/2014 02:17 PM, Volker Pilipp wrote:


On Wed, Sep 17, 2014 at 2:04 PM, Nils Gladitz <nilsglad...@gmail.com
<mailto:nilsglad...@gmail.com>> wrote:

    On 09/17/2014 01:50 PM, Volker Pilipp wrote:

        I did so and found the following strange behaviour

        link_directories(  /opt/XXX/lib ) -> no effect
        but
        link_directories(  /opt/ ) -> -L/opt (?!)


    Probably the same logic as for target_link_libraries().
    E.g. implicit link directories aren't repeated as explicit link
    directories.

But it is not an implicit link directory at least not according to the
output of
"/sbin/ldconfig -p" . What does cmake consider an implicit link directory?

I think a directory in which the linker looks by default (not the runtime loader; which is what ldconfig manages).

Run e.g.
        echo "int main() {}"|/opt/XXX/bin/g++ -xc++ - -v
And see the directories being passed to collect2 with -L.

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to