MantisBT - CMake
View Issue Details
0005324CMakeCMakepublic2007-07-11 05:042016-06-10 14:30
Mathias Fröhlich 
Bill Hoffman 
normalfeaturealways
closedmoved 
 
 
0005324: Library paths for non default architecture builds
Many architectures put libraries for different ABI's and architectures that reside on the same system in different library directories.

To make sure cmake's FIND_LIBRARY looks for the libraries in the correct paths it would be nice to have a say

CMAKE_MULTILIB_PATH

cmake variable that contains a search list of directories relative to the library path that is used for FIND_LIBRARY.

For EMT64 linux builds, something like that is already hard coded in the c code. There the lib directory is replaced with the lib64 directory that usually contains the EMT64 libs.
On other unix systems, we find different path suffixes that should also be handled with a similar scheme.

The libraries for different ABSI reside in different directories relative to the library directory:
EMT64 linux: <libdir>/../lib64
64 bit sparc: <libdir>/sparcv9
hp-ux pa risc 64 bit: <libdir>/pa20_64
hp-ux ia64 bit: <libdir>/hpux64
irix 64 bit: <libdir>/../lib64

Wouldn't it make sense to generalize the hard coded 64 bit linux library search path to something configurable. Say we invent a new CMAKE_MULTILIB_PATH variable that can be set.
For EMT64 linux this would replace the hardcoded c++ code and would read: CMAKE_MULTILIB_PATH=../lib64:.
For that pa20_64 hp-ux stuff this would then read: CMAKE_MULTILIB_PATH=pa20_64

A similar path, may be the first path component from the proposed CMAKE_MULTILIB_PATH can be used to alter the default library install directory.

See also the given URL for a mail thread where this is discussed.
No tags attached.
Issue History
2009-02-18 15:47Thomas HarningNote Added: 0015170
2016-06-10 14:27Kitware RobotNote Added: 0041376
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0015170)
Thomas Harning   
2009-02-18 15:47   
This fix would also help resolve pseudo-cross-compiling i386 code on an x86_64 machine with the standard */lib -> */lib64 and */lib32 containing i386 code.
(0041376)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.