MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014838 | CMake | CMake | public | 2014-03-25 16:21 | 2016-06-10 14:31 |
Reporter | Nico Schlömer | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0014838: INSTALL(EXPORT ...) sets IMPORTED_LINK_INTERFACE_LIBRARIES_* differently from linker | ||||
Description | When linking a library against, say, liblapack.so, TARGET_LINK_LIBRARIES(mytarget lapack) the link line will contain something along the lines of `/usr/lib/liblapack.so` (mostly a symlink), which the linker will correctly resolve to wherever the actual LAPACK binary sits; e.g., $ ldd /opt/trilinos/lib/libepetra.so [...] liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007fae46c64000) [...] When using CMake's INSTALL(EXPORT ...) functionality, the exported files will contain `IMPORTED_LINK_INTERFACE_LIBRARIES_<build type>` with LAPACK as appearing on the link line, e.g., set_property(TARGET epetra APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) set_target_properties(epetra PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "/usr/lib/liblapack.so" IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libepetra.so.11.7" IMPORTED_SONAME_RELWITHDEBINFO "libepetra.so.11" ) This poses problems whenever you use this exported information since it requires the symlink /usr/lib/liblapack.so to exist when really all you need is /usr/lib/liblapack.so.3gf. A typical case for where this causes conflicts is Debian. Here, the former (/usr/lib/liblapack.so) is part of liblapack-dev, the latter (/usr/lib/liblapack.so.3gf) of the separate package liblapack. I suppose the exported information should reflect as accurately as possible what is actually required by the library and thus follow the symlinks just like the linker does. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-03-25 16:21 | Nico Schlömer | New Issue | |||
2014-03-25 21:51 | Ben Boeckel | Note Added: 0035514 | |||
2014-03-26 06:18 | Nico Schlömer | Note Added: 0035517 | |||
2014-03-26 08:38 | Brad King | Note Added: 0035518 | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042518 | |||
2016-06-10 14:29 | Kitware Robot | Status | new => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|