[petsc-dev] Curse CMake to the Depths of Hell
Jed Brown
jed at jedbrown.org
Wed Jan 18 10:21:31 CST 2017
Matthew Knepley <knepley at gmail.com> writes:
> I want to use Pragmatic, and it seems that the CMakeLists.txt is
> constructed correctly, but the dynamic library has no path in it, so after
> the link, I still need DYLD_LIBRARY_PATH. For some reason, the CMake
> install is screwing up.
>
> Jed, do you know how to fix this? If not, I will just explicitly set this
> in our code.
I have used this in CMakeLists.txt.
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
See also https://cmake.org/Wiki/CMake_RPATH_handling
> Matt
>
> master *$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tests$ otool
> -L
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/externalpackages/git.pragmatic/build/lib/libpragmatic.dylib
> otool -L
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/externalpackages/git.pragmatic/build/lib/libpragmatic.dylib
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/externalpackages/git.pragmatic/build/lib/libpragmatic.dylib:
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/externalpackages/git.pragmatic/build/lib/libpragmatic.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmetis.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpichcxx.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libpmpich.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpich.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libopa.1.dylib
> (compatibility version 2.0.0, current version 2.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpl.1.dylib
> (compatibility version 2.0.0, current version 2.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 1197.1.1)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
> 120.0.0)
> master *$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tests$ otool
> -L /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libpragmatic.dylib
> otool -L /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libpragmatic.dylib
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libpragmatic.dylib:
> libpragmatic.dylib (compatibility version 0.0.0, current version 0.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmetis.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpichcxx.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libpmpich.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpich.10.dylib
> (compatibility version 11.0.0, current version 11.4.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libopa.1.dylib
> (compatibility version 2.0.0, current version 2.0.0)
> /PETSc3/petsc/petsc-dev/arch-c-exodus-master/lib/libmpl.1.dylib
> (compatibility version 2.0.0, current version 2.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
> 1197.1.1)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
> 120.0.0)
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170118/0efb3bbb/attachment.sig>
More information about the petsc-dev
mailing list