Am Mittwoch, 12. Juli 2017, 18:31:56 schrieb René J. V. Bertin:
> Andreas Naumann wrote:
> > cmake instrospects your compiler and asks for system directories. Only
> > these system directories will be removed and the corresponding libraries
> > will be linked by -l<...>. So, you should check your compiler and the
> > environment. I had several problems years ago with the environment
> > variable LIBRARY_PATH, which leads to such a behavior.
> 
> Hello Andreas,
> 
> Aha, I indeed have LIBRARY_PATH=/opt/local/lib set (by the build scripts I
> use). From what I understand, that variable allows you to specify a set of
> -L directories via an env. variable (other than LDFLAGS).
> 
> It seems that clang handles that variable in a somewhat different manner
> than GCC does. Even in a very simple call on the commandline (including the
> -v option) I see it adds -L/opt/local/lib AFTER the user-supplied
> libraries, where GCC puts it before the 1st -l option.

Welcome to the work of link_directories(). This is exactly the reason to avoid 
it: it always causes trouble.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

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