<div dir="ltr">Hello,<div><br></div><div>I'm using cmake 3.4.1.  I'm trying to compile libraries & executables with an RPATH.  To that end, I use the following settings:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><br></div><div><div>SET(CMAKE_SKIP_BUILD_RPATH  FALSE)</div></div><div><div>SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)</div></div><div><div>SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)</div></div></blockquote></div><div><br></div><div>I then link in a lot of libraries.  However, ONLY ONE of the libraries gets picked up to be used in the RPATH sent to the linker.  I can manually set CMAKE_INSTALL_RPATH (that works).  But CMAKE_INSTALL_RPATH_USE_LINK_PATH seems to be broken.</div><div><br></div><div>Interestingly, the one library it's willing to auto-generate an RPATH for is the same library, whether it comes first or last in the link command line.  The link command generated by CMake is shown below; it's clear that many libraries are being linked in, but only one rpath is being generated.</div><div><br></div><div>HELP!!!!?</div><div>--- Elizabeth</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><p class="">[ 30%] Linking CXX executable test_array</p></div><div><p class="">cd /Users/rpfische/git/spsparse/build/test && /Users/rpfische/macports/mpgompi-4.9.3/bin/cmake -E cmake_link_script CMakeFiles/test_array.dir/link.txt --verbose=1</p></div><div><p class="">/Users/rpfische/macports/mpgompi-4.9.3/bin/g++   -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/test_array.dir/test_array.cpp.o  -o test_array  /Users/rpfische/eb/software/gtest/1.7.0-GCC-4.9.3/lib/libgtest.a /Users/rpfische/eb/software/gtest/1.7.0-GCC-4.9.3/lib/libgtest_main.a /Users/rpfische/eb/software/netCDF/4.3.2-mpgompi-4.9.3/lib/libnetcdf.dylib /Users/rpfische/eb/software/netCDF-C++4/ecdf914-mpgompi-4.9.3/lib/libnetcdf-cxx4.dylib /Users/rpfische/eb/software/ibmisc/devel/lib/libibmisc.dylib ../slib/libspsparse.dylib /Users/rpfische/eb/software/netCDF/4.3.2-mpgompi-4.9.3/lib/libnetcdf.dylib /Users/rpfische/eb/software/netCDF-C++4/ecdf914-mpgompi-4.9.3/lib/libnetcdf-cxx4.dylib /Users/rpfische/eb/software/ibmisc/devel/lib/libibmisc.dylib -Wl,-<span class="">rpath</span>,/Users/rpfische/eb/software/ibmisc/devel/lib </p></div></blockquote></div>